Thanks for all your help. I have another question regarding strategy exits. Again, just learning. I am trying to exit when the first of two actions occurs. When I use this looking for just one parameter it works properly.
input barexit = 2;
def LongExt= LongEnt from barexit bars ago;
AddOrder(OrderType.SELL_TO_CLOSE, LongExt, high, TradeSize);
Where LongEnt is also aready defined.
However when I try this, I don't get an error but it seems like half of the trades are no longer there?
input TargetRatio = 1.015;
input barexit = 2;
def LongTarget = LongEnt * TargetRatio;
def LongExt= LongTarget or LongEnt from barexit bars ago;
AddOrder(OrderType.SELL_TO_CLOSE, LongExt, close, TradeSize);
Any help would be great!
input barexit = 2;
def LongExt= LongEnt from barexit bars ago;
AddOrder(OrderType.SELL_TO_CLOSE, LongExt, high, TradeSize);
Where LongEnt is also aready defined.
However when I try this, I don't get an error but it seems like half of the trades are no longer there?
input TargetRatio = 1.015;
input barexit = 2;
def LongTarget = LongEnt * TargetRatio;
def LongExt= LongTarget or LongEnt from barexit bars ago;
AddOrder(OrderType.SELL_TO_CLOSE, LongExt, close, TradeSize);
Any help would be great!