ZigZag is NOT ZigZag!

Locked
Big Be
Trader
Posts: 52
Joined: Thu Nov 01, 2012 6:12 pm

Re: ZigZag is NOT ZigZag!

Post by Big Be »

swordfish wrote:Thank you , Big BE.
With this improved Zig Zag, is it possible to code double top/double bottom and head-and-shoulder patterns?
You can see them often but I don't think it would pick out these patterns reliably, especially if a minor peak is less than n bars from being "in the clear". Possibly an original ZigZag as discussed above would work better.

Big Be
"Big Be"
MKFXTrader
Trader
Posts: 41
Joined: Sun Jul 07, 2013 2:44 pm
Location: Liechtenstein

ZigZag is NOT ZigZag!

Post by MKFXTrader »

Big Be » Mon Dec 17, 2012 4:14 am wrote:Researching ZigZag outside of the Empty4 world, you will see that before Empty4, ZigZag was designed in a very different way than the ZigZag in Empty4. Empty4's ZigZag is looking for the high and low of the last n bars, with a couple extra rules, as will be explained later. Originally ZigZag looked at price movements up and down. It looks at highs and lows, but with a price move percentage filter. I quote well-written selections from the Stockcharts.com website:

"ZigZag
"Introduction
"The ZigZag feature on SharpCharts is not an indicator per se, but rather a means to filter out smaller price movements. A ZigZag set at 10% would ignore all price movements less than 10%. Only price movements greater than 10% would be shown. Filtering out smaller movements gives chartists the ability to see the forest instead of just trees. It is important to remember that the ZigZag feature has no predictive power because it draws lines base on hindsight. Any predictive power will come from applications such as Elliott Wave, price pattern analysis or indicators. Chartists can also use the ZigZag with retracements feature to identify Fibonacci retracements and projections."

"Calculation
"The parameters box allows chartists to set the sensitivity of the ZigZag feature. A ZigZag with 5 in the parameter box will filter out all movements less than 5%. A ZigZag(10) will filter out movements less than 10%. If a stock traded from a reaction low of 100 to a high of 109 (+9%), there would not be a line because the move was less than 10%. If the stock advanced from a low of 100 to a high of 110 (+10%), there would be a line from 100 to 110. If the stock continued on to 112, this line would extend to 112 (100 to 112). The ZigZag would not reverse until the stock declined 10% or more from its high. From a high of 112, a stock would have to decline 11.2 points (or to a low of 100.8) to warrant another line."


The webpage has more info and example charts:
http://stockcharts.com/school/doku.php? ... ors:zigzag

Sometimes the above principle is called a retracement indicator, and sometimes Fibonacci is mentioned. The original concept is a retracement indicator with a settable percent threshold. The Fibo levels are not a core requirement. And yes it repaints. Empty4's ZigZag repaints mostly “forwards”, that is it resets as price moves higher and higher or lower and lower. Not certain if the original ZigZag behaves similarly, but I suspect it does.

In Empty4's ZigZag, percentage is NOT looked at.
Instead it looks back for the highest Highs and lowest Lows of the past n bars, called 'ExtDepth' in ZigZag.

There is one technical requirement in Empty4 ZigZag's code. This is what distinguishes ZigZag from just a Highs and Lows indicator: To have a lower High, there must be an intervening Low. That is, High – Low – lower High. And to have a higher Low, there must be an intervening High: Low – High -- higher Low. And each High [Low] must “qualify”, it must be the highest [lowest] of the past 'ExtDepth' number of bars. You can see all this if you study it on a chart.

This image shows two examples of lower Highs with intervening Lows (ExtDepth = 12):


In Empty4, most ZigZag derived indicators rely on the ZigZag built into Empty4, so incorporate this different concept called "ZigZag".
These include such indicators as “GP Lauer”, “3_Level_ZZ_Semafor_TRO_MODIFIED_VERSION”, a useful version MrPip and I modified called “3_Level_ZZ_Corrected_V2.1”, various "Semaphore" versions we have put out, and others.

Big Be
Big B,
Thank you for correcting the zig zag indicator. I've been using it for awhile and I really appreciate your work. I was wondering if you could also correct this version of zig zag channel alert. Or if possible you could incorporate that into your indicator. The indicator looks to be drawing from the same default Empty4 code. I attach the indi for your consideration. Thank you in advance for your consideration.
You do not have the required permissions to view the files attached to this post.
MKFXTrader
Trader
Posts: 41
Joined: Sun Jul 07, 2013 2:44 pm
Location: Liechtenstein

ZigZag is NOT ZigZag!

Post by MKFXTrader »

Big Be,
Any help with request please? :arrrg:
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

ZigZag is NOT ZigZag!

Post by fxozgirl »

MKFXTrader » Fri Aug 01, 2014 5:47 am wrote:Big Be,
Any help with request please? :arrrg:

MKFXTrader, this last post on this thread (before yours yesterday) was in 2012. I have not seen BigBe around the forum for some time, so no point getting frustrated, it is not likely you are going to get a response from him.

Perhaps try sending him a private message, he may respond in this manner.
MKFXTrader
Trader
Posts: 41
Joined: Sun Jul 07, 2013 2:44 pm
Location: Liechtenstein

ZigZag is NOT ZigZag!

Post by MKFXTrader »

fxozgirl » Thu Jul 31, 2014 9:35 pm wrote:
MKFXTrader » Fri Aug 01, 2014 5:47 am wrote:Big Be,
Any help with request please? :arrrg:

MKFXTrader, this last post on this thread (before yours yesterday) was in 2012. I have not seen BigBe around the forum for some time, so no point getting frustrated, it is not likely you are going to get a response from him.

Perhaps try sending him a private message, he may respond in this manner.
Thank you. I did not even notice to look.
Big Be
Trader
Posts: 52
Joined: Thu Nov 01, 2012 6:12 pm

ZigZag is NOT ZigZag!

Post by Big Be »

MKFXTrader,
I got your request and downloaded your indi, but I have been too busy to look at it. I will as soon as I can.
"Big Be"
MKFXTrader
Trader
Posts: 41
Joined: Sun Jul 07, 2013 2:44 pm
Location: Liechtenstein

ZigZag is NOT ZigZag!

Post by MKFXTrader »

Big Be » Fri Aug 01, 2014 3:37 am wrote:MKFXTrader,
I got your request and downloaded your indi, but I have been too busy to look at it. I will as soon as I can.
Thank you very much Big Be.
eigenvector
Trader
Posts: 20
Joined: Sat Jul 14, 2012 3:14 pm

ZigZag is NOT ZigZag!

Post by eigenvector »

Big Be, thanks for your explanation of ExtDeviations. Allow me to assist with a better definition of ExtBackstep:
ExtBackstep is apparently the number of previous Highs and Lows that it looks at, searched for up to 100 bars back.
ExtBackstep is a variable that controls how many bars back the indicator will repaint prior highs and lows. Let's say ExtBackstep is set to 3. After a new high A is made, A is stored in the buffer that stores highs. But 3 bars later, a newer high B is made. So the algorithm erases all the previous highs (including A) within the last 3 bars, and then puts in the new high (B) on the current bar in the buffer that stores highs. The same principle applies to new lows.

Thus I refer to ExtBackstep as the repaint variable.
Big Be
Trader
Posts: 52
Joined: Thu Nov 01, 2012 6:12 pm

ExtBackstep Explanation

Post by Big Be »

eigenvector,
I agree it is the repaint variable.
But, in the strategy tester, it will repaint the last high/low even 6 or more bars later when set to 3, if that is the first higher high or lower low.
"Big Be"
Big Be
Trader
Posts: 52
Joined: Thu Nov 01, 2012 6:12 pm

ZigZag Channel Modified

Post by Big Be »

I got a couple surprises - good ones. The channel indi is actually a competently written indi. By "Coders Guru" explains why. And the change you wanted turned out to be one of the easiest I have been asked for. So here you are.

I don't know how you are using it (I would like to see). I would set ExtBackstep to 1 and suggest trying ExtDepth at 18 and up to see what works best. Set ExtDeviation per what I wrote above.

Latest version on page 7.
.
You do not have the required permissions to view the files attached to this post.
Last edited by Big Be on Sat Aug 16, 2014 8:58 pm, edited 1 time in total.
"Big Be"
Locked

Return to “Coders Hangout”