Hi guys:
I just used EA for 1 day.. And I am totally confused with some functions. In the included standard "MACD" library , i thought PlotIndexSetInteger(1,..) just ignore several values at the beginning.. But what's the use of paramerater 1,sometimes it's 0..
help plz...
Hi.
MACD indicator have 2 lines: MACD line and signal line. In this code, values of MACD line are in ExtMacdBuffer array and signal values are in ExtSignalBuffer.
But you can change a properties of this lines, e.g. color, weight, first bar from what index will be drawn. This properties you can change by functions PlotIndexSetInteger (https://www.mql5.com/en/docs/customind/indicatorsetinteger), PlotIndexSetDouble etc.
In first param of PlotIndexSetInteger, you can define, what line property you can change (in your example 0 means macd line, 1 - signal line). In second param you define what property of indicator line you can change (PLOT_DRAW_BEGIN allow you define first bar from what indicator will be drawn). In third params, you set value of property.
In line
PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,InpSignalSMA-1);
you define that signal line of MACD start drawing from bar InpSignalSMA-1.
- 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
Hi guys:
I just used EA for 1 day.. And I am totally confused with some functions. In the included standard "MACD" library , i thought PlotIndexSetInteger(1,..) just ignore several values at the beginning.. But what's the use of paramerater 1,sometimes it's 0..
help plz...