Using iCustom function of the ZigZag indicator to close open trades when a new peak or trough is form
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
ZZ is a repainting indicator. You don't want to do that.
Hello programmers,
Please I need your assistance using the iCustom function of the ZigZag indicator for my EA . The EA is meant to close open orders once the Z
igzag indicator forms a new peak or trough. So basically, I want a situation where once the ZigZag leg breaks in a new direction (peak or trough) only then will the close trade action be executed. Below is the code I used but it closes trade once it is activated on the chart without waiting for a new peak or trough to form.
Please any help in this direction will be highly appreciated!
The problem with ZigZag is not only that it redraws and is overdue, but also that on the bar we do not know which event occurred first: High or Low.
This is especially critical for long bars, when there should be a local minimum and a local maximum on the same bar.
Therefore, to make a correct decision, it is necessary to take into account the tick history.
The problem with ZigZag is not only that it redraws and is overdue, but also that on the bar we do not know which event occurred first: High or Low.
This is especially critical for long bars, when there should be a local minimum and a local maximum on the same bar.
Therefore, to make a correct decision, it is necessary to take into account the tick history.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello programmers,
Please I need your assistance using the iCustom function of the ZigZag indicator for my EA . The EA is meant to close open orders once the Z
igzag indicator forms a new peak or trough. So basically, I want a situation where once the ZigZag leg breaks in a new direction (peak or trough) only then will the close trade action be executed. Below is the code I used but it closes trade once it is activated on the chart without waiting for a new peak or trough to form.
Please any help in this direction will be highly appreciated!