Horizontal line price level not working
-
Hi all, I'm trying to use the price level of a horizontal line to set take profit and stop loss levels. I want to use lines rather than calculated level as I want to be able to move the lines as the trades progress and have the TP and SL change with the lines.
The problem is the price levels are not saving correctly. See link below to example. In the comments you can see the price levels are not meaningful. I've tried using all the price options including "price 1" but nothing seems to work when backtesting.
https://fxdreema.com/shared/BgqfXxprc
Any suggestions would be much appreciated.
Thanks Drew
-
Here's a link with the line price set to "Price 1"
-
In my opinion, i guess you need to use variables to set the TakeProfit, valued same as the lines.
-
@biztet The drawing blocks are connectec below a 'for each trade' block. This means they will only be activated if there is at least one open trade right now. Additionally, they will be modified every single tick when you are supposed to have static values. Is that what you want?
-
Yeah @drewinbrissie , like @l-andorrà said, is that what you want?

-
@l-andorrà Thanks for the reply. I don't want it to re-draw every tick. I've worked out another way using variables and re-setting the TP and SL using "on trade" events - when either a new trade is opened, or a stop is modified. This works well and only when a trade event occurs.
Thanks for your help, much appreciated.
Drew
-
@drewinbrissie You're welcome.