1 registered members (AndrewAMD),
1,248
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Help with plotting multiple ZigZag
#485577
03/25/22 15:54
03/25/22 15:54
|
Joined: Jul 2021
Posts: 52
degenerate_762
OP
Junior Member
|
OP
Junior Member
Joined: Jul 2021
Posts: 52
|
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.
// 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?
Last edited by degenerate_762; 03/26/22 05:13.
|
|
|
Re: Help with plotting multiple ZigZag
[Re: Petra]
#487126
01/25/23 00:33
01/25/23 00:33
|
Joined: Apr 2020
Posts: 7 Germany
M_D
Newbie
|
Newbie
Joined: Apr 2020
Posts: 7
Germany
|
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?
|
|
|
|