Thanks
An indicator can't trade! Only EAs, Scripts and Services (only on MT5) can carry out trading operations!
And also very importantly, it can't make coffee! 😂
An indicator can't trade! Only EAs, Scripts and Services (only on MT5) can carry out trading operations!
And also very importantly, it can't make coffee! 😂
LOL thanks.
So that part I actually did know about. But what about the objects, text labels, arrow pointers, and other graphic things ? Any limits on indicators vs EA's on this ?
And can an EA show indicators on the chart ? If not then it seem I need a combination of both for my next project to both show a custom indicator and features of the EA too ?
What do you think ?
Thanks
Yes, EAs and Scripts can place all types of graphic objects on the chart.
On MT5 they can also add Indicators to charts, but not on MT4. On MT4 you can apply a Template but that would consequently remove the EA.
However, both on MT4 and MT5, an EA you can access the data from any Indicator even if not present on the chart itself. That is usually how EAs work, by accessing the data from indicators (or normal OHLC data), in order to calculate entries and exits.
Also, note that any indicators on a Chart will work totally independently of what an EA may be accessing. There is no communication or synchronisation between them. This is a very important note. An EA may be accessing an SMA20 and yet there can be a EMA50 on the chart but no SMA20. They are totally independent of each other.
This is exactly what I needed to know.
Indicators use OnCalculate() and EAs use OnTick(). You can't do it the other way round. OnCalculate is not available on EAs and OnTick is not available on Indicators.
This is what I thought from reading some online docs but wanted to confirm THANKS.
Assuming most of my EA code will then be in OnTick() or OnInit() where should indicators be ?
double histo_1 = iCustom(Symbol(),NULL,"MACD True",2,1);
What logic is there to put indicator data in Ontick() vs OnInit() ?
For example, I assume this code should be in Ontick() ?
I guess I'm still confused about structure of code. If comparisons regarding indicator data etc ? OnTick() is where I've mostly been working and OnInit() just for some startup declarations etc. ? Is this what I should be doing ?
Thanks
What logic is there to put indicator data in Ontick() vs OnInit()?
For example, I assume this code should be in Ontick() ?
I guess I'm still confused about structure of code. If comparisons regarding indicator data etc ? OnTick() is where I've mostly been working and OnInit() just for some startup declarations etc. ? Is this what I should be doing ?
On MT4, calling iCusom() or other iFunctions() for indicators and OHLC data should be processed by OnTick(). In fact, 99% of your code should be processed by OnTick() and very little in OnInit() which is only for initial startup.
Hi all,
I guess what I really need to plan my next project is a generalized list of what custom indicators CAN'T do. vs what EA's CAN'T do.
Or at least some main feature differences that might guide me in deciding EA vs Indicator.
Please advise
Thanks
So your next project is actually learning mql .. :)))
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I guess what I really need to plan my next project is a generalized list of what custom indicators CAN'T do. vs what EA's CAN'T do.
Or at least some main feature differences that might guide me in deciding EA vs Indicator.
Please advise
Thanks