Hello Roberto,
Thank you very much. It works perfectly…
However I have a followup question. Next step is to set an entry, exit and target when both conditions are met.
How would you program that? Because I tried it with the indicator, highest[10] .
I set the entry at highest[10] and i want to ext at higest[10] minus 1* ATR and want to take profit at 2 * ATR.
This works for the entry, but not to set a exit and target, because the program keeps recalculating the value of higest[10] and thus contnually changing the exit and target.
Kind regards,
Jaldidee