I have a strategy developed in strategy builder, but it does not work very well.
I want my stop loss and my profit target to be placed below/above the signal bar.
When the conditions are met, the order is triggered, but I cannot have the stop loss and the profit target placed automatically.
Since my stop loss and my profit target will be placed dynymically, I thought this would happen when the signal bar is mature and would be Bar[1] and not Bar[0].
Anyway I can not have my stop loss and my profit target when my order is triggered.
I have the following:
Tab1
TriggerState >= 2 Position.MarketPosition = MarketPosition.Flat Do the following TriggerState = 0;
Tab2
myCondition Position.MarketPosition = MarketPosition.Flat Do the following TriggerState = 1; EnterLongStopMarket(DefaultQuantity, (High[0] + (1 * TickSize)) , @"Long");
TriggerState = 1 Position.MarketPosition = MarketPosition.Long Do the following TriggerState = 2; StopLoss = (Position.AveragePrice + ((Low[1] + (LongInitialStopLoss * TickSize)) )) ;
Position.MarketPosition = MarketPosition.Long Default input[0] >= (Position.AveragePrice + (LongTraget * TickSize)) Do the following ExitLong(DefaultQuantity, @"LongProfitTarget", @"Long");
Thanks in advance.

Comment