DodgerBlue and OrangeRed are "ML_SuperTrend", while LightSkyBlue and White are "supertrend"─both set to a 22 Signal Spacing/Period for ATR calculation, respectively; and a 3.0 Band Width/ATR multiplier for band width calculation, respectively.
Although the ML_SuperTrend source code is a well written example of machine learning indicator code, the practical extent to which it creates something new is debatable.
I'm trying to recall the indicator in the expert, but the dashboard continues to appear and disappear on the graph.
Could you indicate a better way then below code to recall it in a expert?
CopyBuffer(SuperTrend_handle, 1, 0, Bars, SuperTrend);
I'm trying to recall the indicator in the expert, but the dashboard continues to appear and disappear on the graph.
That is generally caused by too many objects drawn/updating on a chart at the same time that the indicator is sending data to another program, e.g., an EA. This is known as "indicator flicker."
As you don't appear to be trying to get/call the indicator dashboard object values in your EA, the easiest way to stop flicker is to disable InpShowDashboard in the indicator settings/inputs─set to false.
That is generally caused by too many objects drawn/updating on a chart at the same time that the indicator is sending data to another program, e.g., an EA. This is known as "indicator flicker."
As you don't appear to be trying to get/call the indicator dashboard object values in your EA, the easiest way to stop flicker is to disable InpShowDashboard in the indicator settings/inputs─set to false.
I'm not able to set it to false because I don't know the exact way to recall the indicator in the expert.
Could you show the exact parameters sequence in the iCustom function?
Thank you
Could you show the exact parameters sequence in the iCustom function?
Basically, you need to use an array, a handle, and CopyBuffer(). This is the optimal way to call external indicator buffer values in an EA. I sent you a video tutorial that can't be posted in the Forum. If you go into the indicator source code, change InpShowDashboard to false, and Compile it, you won't have to put that massive list of settings in your iCustom() call─just put in the indicator name. Use ChartIndicatorAdd() to automatically attach the indicator to the chart from within the EA.
If that seems like a bit much for you at this time, you can use MT5 terminal-wide GlobalVariables, e.g., GlobalVariableSet(), GlobalVariableGet(), and GlobalVariableDel()... for starters. You will, however, have to modify the indicator code as well. You Set in the indicator and then you Get in the EA. Del goes into the indicator code's OnDeinit() function/event hander─otherwise the GV will linger for 4 weeks in MT5. This is slower and more burdensome on MT5. A few GV's are no big deal, but too many can pose a problem. Even if you use this method for now, you should really get into the habit of using iCustom(). Note that you'll still need to use ChartIndicatorAdd() to automatically attach the indicator to the chart which in turn, requires ICustom() and a handle.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use




Machine Learning Supertrend:
A machine-learning inspired approach towards trending regimes. Providing accurate signals and backtest confidence built-in
Author: Hammad Dilber