Set take profit based on stop loss?
-
Hi
I set my stoploss based on an indicator. So after the stop is set I want to set the take profit based on the stop loss.so if the stop is 20 pips I want the take profit to be 40. Is there a easy way to do this?
-
2 ways in this example: https://fxdreema.com/shared/43WHI9Ulb
The Buy trade is opened with SL and TP of 20 pips, and then TP is modified as 200% of SL. Note that in "For each Trade" there is value 1 in the last parameter, which means that the very last trade (the one that was just created) is loaded in it and then modified.
And the Sell trade is opened directly with SL = 20 and TP = 2 x SL. For this I used a Variable named "MyStopLoss" which holds the value of 20. -
Thanks thats awsome.
another quick question. If I only got the ex4 file of an indicator and want to use it as a condition. Is there a way I can set the name and choose buffers on my own? So I dont have to change the code manualy? Much easier to have it all in the software...
-
In the past all input parameters were accessible in .ex4 files, but now nothing can be read from there, or at least I don't know how. Well, copyright information can be read, but who cares.
I wrote some information in the window where indicators are organized, also look at the bottom half of this page to see what datatypes to use for parameters: https://fxdreema.com/documentation/proj ... indicators