Airwaver:
Hello,
i would like to draw an indicator when my experts starts. Is this possible?
In my case i would like to draw the MAHandle to the chart window.
Thank you!
Yes, you have to use ChartIndicatorAdd(). Something like :
int OnInit() { MAHandle = iMA(_Symbol, _Period, MovingPeriod, 0, MODE_SMA, PRICE_CLOSE); if(MAHandle == INVALID_HANDLE) { printf("Error creating MA indicator"); return(INIT_FAILED); } ChartIndicatorAdd(ChartID(), 0, MAHandle); return(INIT_SUCCEEDED); }

Documentation on MQL5: Chart Operations / ChartIndicatorAdd
- www.mql5.com
Chart Operations / ChartIndicatorAdd - Documentation on MQL5

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
i would like to draw an indicator when my experts starts. Is this possible?
In my case i would like to draw the MAHandle to the chart window.
Thank you!