ZIGZAG autotrading
Forums › ProRealTime English forum › ProOrder support › ZIGZAG autotrading
- This topic has 11 replies, 3 voices, and was last updated 7 years ago by
Nicolas.
-
-
07/12/2017 at 5:50 PM #40480
Anybody who knows if a zigzag system works for autotrading. I used the code in the PRT trading manual and it gives 100%win every time and on every TF?
123456789myZigZag = ZigZag[10]c11 = (myZigZag > myZigZag[1])c12 = (myZigZag < myZigZag[1])IF c11 AND NOT LONGONMARKET THENBUY 1 SHARES AT MARKETENDIFIF c12 AND NOT SHORTONMARKET THENSELLSHORT 1 SHARES AT MARKETENDIF07/12/2017 at 7:35 PM #40496Haha if only!? Zig Zag ‘repaints’ I think? Also I’m sure the ZigZag is not allowed in Live Trading (due to repaint), but I could be wrong? I’m sure Nicolas will be along shortly to advise.
There is an Indicator in this site Library that works similar to the default PRT Zig Zag but no repaint.
https://www.prorealcode.com/prorealtime-indicators/fractals-zigzag/
And below will save Nicolas repeating himself! 🙂 …
07/12/2017 at 8:14 PM #40497hehe:) yes I tought it would be too easy.
PRT did not acsept zigzag code it says.But another question, evan if it repaints. Would it not be possible to trade the repaints manually? I just looked at the PRT code in backtest and saw it would migth be possible?
07/12/2017 at 11:06 PM #4050207/13/2017 at 7:18 AM #4050507/13/2017 at 7:31 AM #40507Grahal: I was looking at the brent crude 5min chart yesterday with the zigzag code and setting/adjusted to myzigzag=zigzag[1] so it gave many signals.
Signals came short and long and so on many times without drawing arrows(probacktest buy/short signals) but evan if it did so I think it would be proffitable to just follow it and have a 10pip stop or so everytime.
I will have a look after work today aswell Grahal.
07/13/2017 at 7:07 PM #40577Hi Ken
I did a few manual trades (with profit) on 1 Min TF using the default PRT Zig Zag. It helps, but you also have to judge market structure etc else you get whip-sawed when price is ranging. When you look back of course Zig Zag appears the perfect Indicator due to repaint.
Then I thought .. what’s the point as Zig Zag can’t be used on a Auto-Trade anyway?
Sooo I spent hours on various instruments and various TFs with Nicolas Fractals Zig Zag (link above in #40496 ) but even with ‘cp’ same value as the Indicator, Bot trades don’t align with markers on the Indicator. See green vertical dotted lines on attached. I’m sure there’s some simple explanation or tweak required? Nicolas may help us when he passes by! 🙂
As you can see from the results attached there is scope for Fractals Zig Zag as a basis for a Bot?
123456789101112131415161718192021222324252627//https://www.prorealcode.com/prorealtime-indicators/fractals-zigzag/DEFPARAM CUMULATEORDERS = FALSE//---external parameterscp = cpif high[cp] >= highest[2*cp+1](high) thenLH = 1elseLH = 0endifif low[cp] <= lowest[2*cp+1](low) thenLL = -1elseLL = 0endifif LL = -1 thenBuy 1 Contract at Marketendifif LH = 1 thenSellShort 1 Contract at Marketendif07/13/2017 at 8:06 PM #40581I also made a Bot out of Nicolas Fractal Screener, results attached and code attached.
Note that rise in equity curve early on and then flattened out. If I optimise over the most recent 10000 bars I can get a good equity rise so a regular / periodic optimisation (every month or so) would result in an upward equity curve over the full 100,000 bars I reckon!?
GraHal
PS Ideal one to do a WF optimisation on … results attached, but doesn’t make a massive difference! 🙂
07/13/2017 at 8:26 PM #40587When I looked closer, there was a £900 increase on above equity curve using WF optimisation over 5 periods and 100,000 bars.
Attached are WF Opti over the most recent 10,000 bars, note how the variables value change drastically in the last period?
In 1st sample period (Aug 16 – Jan 17) lb = 2, p = 18
In 5th sample period (Jan 17 – Jun 17) lb = 14, p = 2Anyone (to get discussion going! 🙂 ) … comments appreciated.
GraHal
07/13/2017 at 10:46 PM #40599I dont know how fractal ziigzag from nicolas works, never tried it(dident have the chance today).
But it seems like the markings are lagging vs the trading order ,I do agree this is a better question for Nicolas:)
When you traded manually today you used 1 min tf. I guess there will be many/ more signals then compare to the 5 min I have checked.(not too much yet).
But a friend of mine used it and gained some cash on it.
He told me that he only used the green arrows and not the other colours that appared as false signals. (Sorry but I cant confirm this myself).
07/15/2017 at 3:05 PM #40726The zigzag code shared made way to many orders for my taste.
I was also looking at the initial zigzag code and could not trade too well with it. 🙁
07/16/2017 at 8:15 AM #40755The fractal zigzag codes is not repainting, so that’s why you get the peak and trough later. Nobody will never know in advance if the market is in a peak formation or in trough one.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on