Hi, I´m making my own EA and I need to set my stop loss above the stucture for sells (view image) but I don´t know how to do it.
Find the highest point through the last candles using iHighest, then set your SL at the desired distance above that level.

- www.mql5.com

- www.mql5.com
- No image posted.
- Until you can state what you mean by “structure” in concrete terms (MA, fractal, highest, etc.) it can not be coded.
Look here for the examples: https://www.mql5.com/de/docs/constants/structures/mqltraderequest
Find the highest point through the last candles using iHighest, then set your SL at the desired distance above that level.
Use the ZigZag indicator. Open it (..\MQL5\Indicators\Examples\ZigZag.mq5) and look at the two buffers for high (and low).
Installed by you EA with iCustom() go back for the latest three highs (if HighMapBuffer[i] >_Point) and get the maximum of these three. Add some points if you'd like to.
Use the ZigZag indicator. Open it (..\MQL5\Indicators\Examples\ZigZag.mq5) and look at the two buffers for high (and low).
Installed by you EA with iCustom() go back for the latest three highs (if HighMapBuffer[i] >_Point) and get the maximum of these three. Add some points if you'd like to.
sorry but i dont know how to do it exactly, im a noob yet, can you explain me more detailed?
An example of working with the ZigZag indicator

- 2018.12.24
- www.mql5.com
The problem is that i dont know how to call to the high (nº1 view image) and put the stop there

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I´m making my own EA and I need to set my stop loss above the stucture for sells (view image) but I don´t know how to do it.