Zig Zag #226
Replies: 6 comments 12 replies
-
I'm not sure how to interpret the output from this indicator. I'm not using any sort of drawing library to visualize the output, it looks like the output is useful for actually drawing. I write unit tests against the output results, but I cannot tell from the output, what the most recent zigZag high and low pivots are. I'd expect to see something like your SuperTrend indicator where it's easy to tell based on the date and whether the upper band or lower band is null or not. I understand algorithms differ across libraries, so I expect the output to be somewhat different. But if the inputs are similar, the values should be close. The way I work with indicators is by saving candle data to CSV files and then writing unit tests against them. So, for most indicators I can get very close to trading view charts. I've tried three different input settings for the % change, 3.5, 5 and 10 and the output didn't appear to come remotely close to Trading View, or at least I couldn't interpret it correctly. Here's the output for daily time interval, EndType.Close and percentChange of 5. The TradingView chart above had a deviation % of 5 and a depth of 10. Data source is polygon.io
|
Beta Was this translation helpful? Give feedback.
-
@DaveSkender Relevant issue for the Stock.Charts library. facioquo/stock-charts#180 |
Beta Was this translation helpful? Give feedback.
-
Hello Dave, I'm also observing that the results of the ZigZag are rather different than what TradingView is presenting/calculating. Yours is picking up additional highs and lows which TradingView is ignoring. TradingView is using a depth which isn't in you r sources (not sure if it should be). For example the AXSBTC@Binance. I'm using the 2h candles from 1 december 21 up to 3 march 22 (746 candles should be more than enough) and start comparing from 1 jan 22. The first 2 are perfect but the 3 and 3th are weird (the two marked with the question marks). Because of this extra h/l the ZigZag is unusable for my needs (the results from this example isn't to bad though). In other cases it will pick up additional lower lows and lower highs while in fact it is properly trending on TV. date=01-01-2022 11:00:00 zigzag=0.00194800 PointType=L RetraceHigh= RetraceLow=0.00194800 date=05-01-2022 23:00:00 zigzag=0.00177000 PointType=L RetraceHigh=0.00191853 RetraceLow=0.00177000 ??? date=07-01-2022 05:00:00 zigzag=0.00170200 PointType=L RetraceHigh=0.00184682 RetraceLow=0.00170200 @code for (int i = 0; i < resultZigZag.Count; i++) string s = string.Format("date={0} zigzag={1:N8} PointType={2:N8} RetraceHigh={3:N8} RetraceLow={4:N8}", zigZagResult.Date.ToLocalTime(), zigZagResult.ZigZag, zigZagResult.PointType, zigZagResult.RetraceHigh, zigZagResult.RetraceLow); |
Beta Was this translation helpful? Give feedback.
-
Hello @DaveSkender |
Beta Was this translation helpful? Give feedback.
-
How to draw the zigzag in python? |
Beta Was this translation helpful? Give feedback.
-
How do I get my zigzag indicator with pivots to look like yours from your website stock indicators.dev specifically referencing the zigzag indicator. I have tried multiple times to replicate your chart indicator but have not been able to get straight lines like yours from the pivot reversals and the zigzag lines. |
Beta Was this translation helpful? Give feedback.
-
Community discussion about the ZigZag indicator
Beta Was this translation helpful? Give feedback.
All reactions