ZigZag : How can i add two periods in one timeframe?

 
int zz=iCustom(_Symbol,PERIOD_M1,iName,ExtDepth,ExtDeviation,ExtBackstep);
int zz2==iCustom(_Symbol,PERIOD_M2,iName,ExtDepth,ExtDeviation,ExtBackstep);
if(!ChartIndicatorAdd(0,0,zz)){ Print("error zz", GetLastError());}
if(!ChartIndicatorAdd(0,0,zz2)){ Print("error zz2", GetLastError());}
I get error

ERR_CHART_INDICATOR_CANNOT_ADD

4114

Error adding an indicator to chart


because periods are different, so what could be another solution to add Two periods of Zigzag in single timeframe?

 
Dark Ryd3r:
I get error

ERR_CHART_INDICATOR_CANNOT_ADD

4114

Error adding an indicator to chart


because periods are different, so what could be another solution to add Two periods of Zigzag in single timeframe?

Do you knowe how to search? Ok, search for "multi timeframe indicator" and use them as examples.

 
Found this but its for MT4, any suggestion will be helpful for any example indicator like this https://www.mql5.com/en/code/7223
Multiple ZigZags in a single window
Multiple ZigZags in a single window
  • www.mql5.com
A simple indicator that demonstrates the general principle of displaying multiple indicators from different timeframes in a single window
 
Dark Ryd3r:
I get error

ERR_CHART_INDICATOR_CANNOT_ADD

4114

Error adding an indicator to chart


because periods are different, so what could be another solution to add Two periods of Zigzag in single timeframe?

Add two ZZs with different depths not periods. M1 12 ExtDepth = M2 6 ExtDepth.

 
Dmitry Kondrashov #:

Add two ZZs with different depths not periods. M1 12 ExtDepth = M2 6 ExtDepth.

thanks