Help with plotting multiple ZigZag

Posted By: degenerate_762

Help with plotting multiple ZigZag - 03/25/22 15:54

Quote

ZigZag indicator; converts the Data series into alternating straight lines with at least the given Depth (in Data units) and Length (in bar units). ZigZag is non-predictive and can only identify trends in hindsight. Returned: rSlope (the slope of the last identified line; upwards lines have a positive slope, downwards lines a negative slope); rPeak (the bar offset of the last identified peak); rLength (the number of bars of the last zig or zag that ends with rPeak). If a nonzero Color is given, the zigzag lines are plotted in the chart. Source code in indicators.c, example in Indicatortest.c. The function internally creates series and thus must be called in a fixed order in the script.


Quote

// plot some indicatorsfunction run(){ set(PLOTNOW);
var* Price = series(price());

// plot Bollinger bands BBands(Price,30,2,2,MAType_SMA);
plot("Bollinger1",rRealUpperBand,BAND1,0x00CC00);
plot("Bollinger2",rRealLowerBand,BAND2,0xCC00FF00);
plot("SAR",SAR(0.02,0.02,0.2),DOT,RED);
ZigZag(Price,20*PIP,5,BLUE);

// plot some other indicators
plot("ATR (PIP)",ATR(20)/PIP,NEW,RED);
plot("Doji",CDLDoji(),NEW+BARS,BLUE);
plot("FractalDim",FractalDimension(Price,30),NEW,RED);
plot("ShannonGain",ShannonGain(Price,40),NEW,RED);
}


Hi, is there a way to return the zigzag series or plot multiple zigzag indicators please?
Posted By: Petra

Re: Help with plotting multiple ZigZag - 03/26/22 12:40

I think not because the plot has a fixed name "Zigzag", so there can be only one per asset. But i forward this to the developers for using a flexible name in the future for allowing multiple plots.
Posted By: degenerate_762

Re: Help with plotting multiple ZigZag - 03/26/22 13:44

@Petra thanks. having that feature would make my indicator soup even more tasty.
Posted By: M_D

Re: Help with plotting multiple ZigZag - 01/25/23 00:33

Originally Posted by Petra
I think not because the plot has a fixed name "Zigzag", so there can be only one per asset. But i forward this to the developers for using a flexible name in the future for allowing multiple plots.


Hi Petra,
Has there been an update for multiple plots?
Im interested in plotting 3 bollinger bands with different deviations, ... or at least 2 of them. Or is there already a way to get each 2 different rRealUpperBand and rRealLowerBand and i missed it in the manual?
Posted By: M_D

Re: Help with plotting multiple ZigZag - 04/26/24 20:03

Hi @all again,
Sorry for the above, meanwhile figured out a few things.
But currently i am again at ZIGZAG indicator. Would like to use it in mutliple Timeframes.
For example one in 1 hour and the other in 4 hour. Is this possible now?
By the way, am still using Zorro version 2.40.
Any hints and tricks are welcome,
Thanks in advance ...
© 2024 lite-C Forums