I am building a strategy from a custom indicator. The indicator works fine. The strategy also, when:
I have the target profit as well as the stop loss predefined like 10 ticks for example in “Inputs and variables”. In “Stops and targets”, I set the target and stop loss using inputs declared in “Inputs and variables”. The back test here is a success.
Now I want to have my stop loss and target profit set dynamically, placing:
the target profit for each entry X ticks above the signal bar for longs and X ticks below the signal bar for shorts and
the stop loss one tick below the signal bar for longs and one tick above the signal bar for shorts.
In “Do the following”, I have:
EnterLong(); ProfitTarget = (High[0] + (X*TickSize)); StopLoss = (Low[0] - (1*TickSize));
When I am backtesting, the analyser show the chart where I can realized that a trade terminates when another trade takes place. I am not able to see @Target Profit” like when it is static.
I would really appreciate if anyone could advises how to fix this problem.
Thanks!
Comment