The Zig-Zag Trader strategy shows excellent results over 10 years but given the nature of the Zig-Zag indicator, I was wondering if it was viable as an automatic trader.
As you are no doubt aware, the direction and length of each Zig-Zag is not finally established until the beginning of the next leg. The question is whether this code is affected, as it is only looking at the direction of the leg not long after it is established.
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
ZZST = ZigZag[1](totalPrice)
c1 = ZZST > ZZST[1]
IF c1 AND NOT LongOnMarket THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
c2 = ZZST < ZZST[1]
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
c3 = ZZST < ZZST[1]
IF c3 AND NOT ShortOnMarket THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
c4 = ZZST > ZZST[1]
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// Stops and targets
I would very much appreciate your feedback on the viability of this strategy.
I hoped to use ZigZag as part of an automatic trading strategy but Automatic trading in Proreal Time didn’t support this indicator on V10.1, haven’t tried it since 10.2 was released.
Hello Mike, unfortunately this strategy can’t work in real time.
ZigZag indicator are not supported into ProOrder because of its lookback needs to recalculate recent highs and lows to draw zigzag points and it’s not allowed in PRT. While it is great to avoid the so-called “repainting” indicators, it’s also something that sometimes missed in development needs.
So the embedded zigzag that is pre-calculated into the platform can’t be taken into real information in backtest. Sorry.
When you test a strategy with an equity curve so straight, there’s something wrong for sure!
Many thanks, Nicolas. I see the impossibility of trading this live. This harks back to the problems with the strategy based on the screener I posted with three indicators – the need to define the change in trend satisfactorily.
Dear @msblend,
Thank you for your query. I had never thought about stabilising the ZigZag. However, I went to https://www.prorealtime.com/en/indicator-library-open-496 and found the code for a stabilised version. Here is what the author wrote:
ZIGZAG TREND
ZigZag Trend
Binary indicator which adopts the Zigzag mechanism but as opposed to the above two indicators, it gives always valid signals about the direction of a trend and shows when that trend was confirmed.
It does not show peaks and troughs like Zigzag, but returns +1 for valid up trends and -1 for valid downtrends and it rejects all the invalid trends.
The real power of ZZT is that its signals are never revisable, so you can let the indicator provide valid signals for both the past and the present.
Thanks Mike, but even if its informations are not “revisable”, the use of ZigZag indicator in its code make it useless for automatic trading purpose, ProOrder will reject the code.
To point highest high and lowest low, there are plenty of other indicators in the Library:
Thanks @Nicolas. After much research, I find that the SuperTrend is an excellent indicator of trend as it takes account of ATR. I have also tested Pivot Hi/Lo but not as a trend indicator . I look forward to testing the other 3 you mention.
As always your assistance is much appreciated .
Cheers , Mike
Hi Nicholas,
is Multi Factals Indicator that you shared on library is the most similar indicator as ZigZag? I just realized ZigZag can’t be used on automatic trading & glad found this post. Attatched screenshot, Line in black is ZigZagpoints (30*pointsizes), Green line is MultiFactals. My strategy requires cleaner chart like ZigZag. Do we have other indicators ?
br,
CKW
You could potentially get the same thing as the original ZigZag with this indicator: http://www.prorealcode.com/prorealtime-indicators/fractals-zigzag/ You could use Close instead of High/Low values to get the new fractals points. Also a conditional statement to know if the new detected fractal is 30*pointsizes away from the last one should help.
ironshirow – please ONLY use English in the English speaking forum. If you want to communicate in Italian then please use the Italian forums and post a link to this topic. 🙂
Si prega di utilizzare SOLO l’inglese nel forum di lingua inglese. Se vuoi comunicare in italiano, per favore usa i forum italiani e pubblica un link a questo argomento. 🙂
The information collected on this form is stored in a computer file by ProRealCode to create and access your ProRealCode profile. This data is kept in a secure database for the duration of the member's membership. They will be kept as long as you use our services and will be automatically deleted after 3 years of inactivity. Your personal data is used to create your private profile on ProRealCode. This data is maintained by SAS ProRealCode, 407 rue Freycinet, 59151 Arleux, France. If you subscribe to our newsletters, your email address is provided to our service provider "MailChimp" located in the United States, with whom we have signed a confidentiality agreement. This company is also compliant with the EU/Swiss Privacy Shield, and the GDPR.
For any request for correction or deletion concerning your data, you can directly contact the ProRealCode team by email at privacy@prorealcode.com
If you would like to lodge a complaint regarding the use of your personal data, you can contact your data protection supervisory authority.
Get Assistance
Assistance Type
Your Need
Proposed Solutions
Do you like cookies? 🍪 We use cookies to ensure you get the best experience on our website.
(Learn more)