Page 1 of 2

Momentum trade strategy

PostPosted: Tue Nov 23, 2010 3:35 am
by Alexander.Gettinger
Rules for a Long Trade
1) Look for currency pair to be trading below the MA and MACD to be negative
2) Wait for price to cross above the MA, make sure that MACD is either in the process of crossing from negative to positive or have crossed into positive territory no longer than [MACD_Cross_Distance] bars ago
3) Go long [Open_Distance] pips above the MA

Rules for a Short Trade
1) Look for currency pair to be trading above the MA and MACD to be positive
2) Wait for price to cross below the MA, make sure that MACD is either in the process of crossing from positive to negative or have crossed into negative territory no longer than [MACD_Cross_Distance] bars ago
3) Go short [Open_Distance] pips below the MA

For this strategy must be installed indicator Averages (viewtopic.php?f=17&t=2430).

2018-11-19_11-48-49.png
2018-11-19_11-49-22.png


MomentumTradeStrategy v2.lua
(137.54 KiB) Downloaded 387 times

Re: Momentum trade strategy

PostPosted: Thu Jan 27, 2011 11:37 am
by virgilio
Why is it that when I try to use the Backtest Strategy I always get this message:
Marketscope 2.0
[string "MomentumTradeStrategy.lua"]:141:Unsupported

Can anyone help me with this?

Re: Momentum trade strategy

PostPosted: Thu Jan 27, 2011 1:44 pm
by d10gen3
I have te same problem as Virgilio, is there a way to fix it? Looks like many core functins return null.

Re: Momentum trade strategy

PostPosted: Sun Jan 30, 2011 1:57 pm
by a0007002
I too got this same error. Needs something to be fixed. The Averages indicator is installed and works on other strategies requiring it.

Re: Momentum trade strategy

PostPosted: Tue Feb 01, 2011 8:36 am
by sunshine
a0007002 wrote:I too got this same error. Needs something to be fixed. The Averages indicator is installed and works on other strategies requiring it.

The problem you describe appears in the current version, and our team will do everything to resolve the issue as soon as possible. Thank you for pointing to this problem.

If you restart your Trading Station, the error shouldn't appear.

Re: Momentum trade strategy

PostPosted: Wed Feb 02, 2011 1:30 pm
by a0007002
Closing the program after loading the strategy into the list then re-launching Tradestation worked.
thanks

P.S. - what I did notice tho was that the stop and limit functions didn't seem to work. Not sure if they were supposed to.

Re: Momentum trade strategy

PostPosted: Thu Apr 28, 2011 5:37 pm
by TMos1124
If I change the code at the stop and limit (default is 1) to 5 that would change the order amount correct? If so, can I just save and run? Is there any way I can edit the trailing stop parameters? Again, your help is invaluable.

Re: Momentum trade strategy

PostPosted: Fri Apr 29, 2011 5:30 am
by Apprentice
If you open an indicator using Notpad.
You can edit the line 57-62 according to your preferences.

Code: Select all
strategy.parameters:addInteger("Amount", "Trade Amount in Lots", "", 1, 1, 100);
    strategy.parameters:addBoolean("SetLimit", "Set Limit Orders", "", false);
    strategy.parameters:addInteger("Limit", "Limit Order in pips", "", 30, 1, 10000);
    strategy.parameters:addBoolean("SetStop", "Set Stop Orders", "", false);
    strategy.parameters:addInteger("Stop", "Stop Order in pips", "", 30, 1, 10000);
    strategy.parameters:addBoolean("TrailingStop", "Trailing stop order", "", false);


If wants to increase Trade Amount in Lots to 5 Edit line 57 to
Code: Select all
strategy.parameters:addInteger("Amount", "Trade Amount in Lots", "", 5, 1, 100);

Re: Momentum trade strategy

PostPosted: Fri Apr 29, 2011 7:24 am
by Blackcat2
Can anyone recommend parameters for 15M and 1H TF?

Thanks..
BC

Re: Momentum trade strategy

PostPosted: Mon May 16, 2011 8:24 am
by TMos1124
Thank you very much, I would also like to know how to edit line 59. I want the limit to be .5 to the total trade amount. If I were to buy 20 for example, I wish for the limit order to be 10 lots.