Trying to figure out what this indicator is looking for.

 

Hey folks, I've found an indicator that probably deserves to be turned into an EA.

It's under the Code Base as "ZigZag.mq4" but I'll repost it here for easiness of laziness ;)

On anything higher than an hourly chart (M30 or less is no good), this thing seems to be hyper-intelligent at picking turning points. I've run several manual back tests on it... it seems to find turnaround points two bars after the new high or low is established so I stuck to two bars as a rule of thumb for my back-test. If you trade long on a new low and short on a new high as soon as each new point is found (takes about one or two bars, I can't tell) then it almost always gains and the losses are next to negligible and occur maybe once out of 11 trades.

It's brilliant...!

What I would like is some help decompiling this thing to find out how it's calculating the turnaround points and possibly some assistance converting this indicator into an EA (instead of drawing a red line between the last low and the new high, it goes short and instead of drawing a red line between the last high and the new low, it goes long. Lots should be no less than 0.1 but as the account grows, lots should equal 1/20,000th of the cash balance; $3000:0.15, $4000:0.2, $20000:1 etc).

My biggest fear is that this program could extend a line (or worse, redraw one) if a new new low is found. If that could happen, then losses could be catastrophic. But if it's some how "just that good" then, as I said at the beginning, it may be worth converting into an EA. I want to make sure that the program does NOT do that - (that it sticks to its guns when it draws a new line). If it does, then I'm going to make it my priority to make an EA out of this thing.

Thanks in advance, I'm going to bed and subscribing to this thread.

I should probably add that I'm using this thing on gold charts that are subject to higher volatility (I've noticed) than fiat currency pairs.

Files:
zigzag.mq4  7 kb
 
This indicator re-paints until the turnaround point is certain..... Search zig-zag on the forum, many have gone before you....Sorry buddy, back to the drawing board...