i have a strategy of stop loss of 1.5 atr. in the code below i get error
10/12/2008 5:53:28 AM Order Sell stop or sell stop limit orders can't be placed above the market. Affected Order: Sell 9962 Stop @ 1.0747
the runtime ATR value is .0038.
10/12/2008 5:53:29 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='ZLR' Mode=Ticks Value=0.00380578851165889 Currency=0 Simulated=False
need to implement logicATR value 0.00380578851165889
10/12/2008 5:53:29 AM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='ZLR' Mode=Ticks Value=0.00380578851165889 Currency=0 Simulated=False
10/12/2008 5:53:29 AM CancelAllOrders: BarsInProgress=0
[FONT=Courier New][SIZE=2][COLOR=#0000ff]
private[/COLOR][/SIZE][/FONT][FONT=Courier New][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] setupStops(){
Print([/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"need to implement logic"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000]"ATR value "[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] + ATRValue);
SetStopLoss(SIGNALZLR,CalculationMode.Ticks,ATRValue,[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]);
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000]//entryOrder.
[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]}
[/SIZE][/FONT]

Comment