SL and TP based on n candle
-
Hi all,
I would like to create an EA where the percentage is based on the StopLoss (SL) from n candle bar and the takeprofit (TP) is the multiple from SL. I did it like below, questions:
- is it correct that I have to define TP (double) first in the constant inputs, so it will multiply with the 100% of SL. I did it like in pict 1, so the constant input needs only to be single digit that will be multiplied with 100
- or if it should be like picture 2. but then the constant input should always be 100 units?
Thanks in advance
pict 1:

pict 2:

-
@andrewfrank You should use the pic 2 configuration, but selecting 'Custom(price level)' instead in the SL mode.
-
@l-andorrà ok Thanks
but then in constant input I should always use 200 and not 2, if I want to 1:2 Risk Ratio from SL? -
@andrewfrank Correct.
-
@l-andorrà do you know how to use it with single digit, instead of using 100 unit?
-
@andrewfrank What do you exactly mean?
-
@l-andorrà
in the below picture, it is supposed to insert the number in 100 unit as a percentage whenever I want to multiple the stop loss, so it would be 100%, 200%, etc.
However, I'd like to use only single digit, so if I want to use 1:2 Risk Reward Ratio, I should be able to put only 2, instead of 200
.is there any function to do this?
I was wondering, to do this like the picture 1 above in my first post, but you mentioned, it wont work...Any other ideas?
Thanks!