SL y TP 2:1 or 1:1 HELP!
-
Hello, someone could give me an example of how to program this SL and TP.
I'm trying to place the SL in the last fractal, ie at the lowest point of the last retreat, but then I'm trying to make the TP is twice the SL that has been placed, ie that the operation is 1:2, if you can put that is editable because in some currencies is even good 1:1.
Someone has experience in creating an SL in this way.
Translated with www.DeepL.com/Translator (free version)
-
@yerlin Storing the price value for the last fractal is easy. However, where is the open proce? You cannot calculate twice the SL distance if no open price is provided.
-

Thanks @l-andorrà , I have almost ready the bot that I was commenting, but I lack small details that still do not dominate for example this is one as I can tell the EA to put me the SL in the first fracture that detects, and I do not modify more the SL.
-

-
@yerlin Not sure I fully understand. Why are you comparing those two fractal positions? Is the white vertical line supposed to represent the trigger to open a trade?
-
@l-andorrà Yes, exactly the white line is where I would execute the input, now I would need to find some way for the EA to detect from where the operation was opened look for his last fractal to place the SL
-
@yerlin When you say 'execute the input', do you mean open the trade? Please remember that a fractal does appear two candles AFTER that low price is identified as a fractal.
On the other hand, if I understand you correctly, that fractal woul be the SL. But then why do you need the fractal that you selected with that white arrow?
-
@l-andorrà because it would be the first lower fractal after the opening of the operation.
-
@yerlin Ok. Now I get it. In that case you need a loop searching for past fractal to meet those conditions. I'm afraid loops are not my strong point. Maybe mr. roar would be able to help. He's very good at it.