Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated in EAs. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
(MT4) Detailed explanation of iCustom - MQL4 programming forum (2017)
You should encapsulate your iCustom calls to make your code self-documenting.
take candle color hekin ashi - MQL4 and MetaTrader 4 #8-10 or #1 (2018)
Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated in EAs. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
(MT4) Detailed explanation of iCustom - MQL4 programming forum (2017)
You should encapsulate your iCustom calls to make your code self-documenting.
take candle color hekin ashi - MQL4 and MetaTrader 4 #8-10 or #1 (2018)
I think I need to change my sources. Because I was advised to use a method similar to this. Do you have any resource suggestions for me as a document or video. It can also be a course.
- 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 everyone, i'm new to MQL4 and i'm working on an EA similar to an MA ribbon.
I shared both the indicator and Ea versions. I had no issue with the indicator version, but i was getting "Array out of range" error in the EA version, so i added the arraypush method as a solution.
However, i don't understand why i had to apply a different method compared to the indicator. I would appreciate it if you could clarify this for me.
I realized that Eas cannot draw on the screen like indicators. I figured this out later. Where can i access this king of informaisons? The Mql4 document didn't satisft me much.
Also, I am looking for a mentor who can help me with mql4 coding. Is there anyone who can assist?
Thanks!
Ea Code:
Indicator Code: