if(Position.MarketPosition==MarketPosition.Long && (MAX(High,(Math.Max(0,BarsSinceEntry("LongEntry")) ))[0]) >= Position.AvgPrice + .0050)
stopOrder = ExitLongStop(1, Position.AvgPrice + (MAX(Low,(Math.Max(0,BarsSinceEntry("LongEntry"))) )[0]) - .0020, "TrailLongTarget", "LongEntry") ;
Basically what I am trying to do is on each new bar check to see if any high since I entered the long position is > entry price + 50 pips. If so a stop order should be place under the highest low since entry - 20 pips. And then update if a new higher low would occur. I also have a hard stop order placed in the onExecution section. Could the problem be having to different stop orders? If so how do I get around this. Otherwise any ideas on how to make this work. Thanks!
GT
Comment