Get TP from Risk calculated over last 5 Bars
-
Hello everyone
First question I have here, but just wanted to say thank you to everyone for answering questions on the forums, I have learnt soooo much just from previous replies 
I am busy creating an EA that bases its TP on risk calculated from the previous 5 bars. The SL is calculate from the trigger bar(candle position 1) so thats not a problem, but the TP(for a sell) is calculated from the high of the trigger candle +3 pips minus the low of the previous 5 candles -3 pips.
I have created a variable and have used the formula block to calculate the value, but it doesnt seem to executing correctly when I run back tests.
Any help would be greatly appreciated.
-
@rudy-1 hello. could this be the problem?

-
@q8carpenter Thanks for the response, still getting 0.00 as TP so doesnt look like it worked

-
@rudy-1 This formula result is not a pip number, its raw price value. Set your SL mode to Custom (price fraction).

-
@roar That worked! Excellent! Thank you
