stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

ZigZag breakdance
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=136
Page 1 of 1
Author:  lhDT [ Wed Dec 07, 2011 3:25 pm ]
Post subject:  ZigZag breakdance

Hi Guys,

Here is my manual trading system, I don't know if it is good to produce an EA for this but would save a lot of time watching charts :)
Timeframes : M15 H1 H4
Pairs : E/U, G/U
Indicators : ZigZag 13,5,5 + stochs 13,3,3
Trading hours : 8:00 - 20:00 (london open + 12)
I attached the indicator I use. It plot the lines when previous hi/low is fixed.

I plot 2 lines from previous hi & low. When the price break one of those by a number of pips defined by the pip difference between current hi-low, I trigger a trade, long or short depends the direction.
Positions can be confirmed with higher timeframe or directly by the stochs (if you like them).
SL is Pips difference / 2
TP isn't clearly defined, I currently use a jumping stop and I move my SL at BE when I have 15pips. I also tested trailing stop.

Example on the attached charts :
GU : Hi-low pips difference is around 43. When price break the blue line by 4pips (43/10), a long trade is triggered.
EU : Hi-Lo pips = 40. Short has been triggered at redline + 4pips

It doesn't produce a lot of trades but they are profitable when triggered.
Maybe we can use buy/sell stops and launch new pending orders if hi-low hasn't been broken.

Does anyone have the time to code this into an EA ?

Tell me what do you think ! Comments highly welcome !

Cheers,
Lio
Author:  DING [ Wed Dec 07, 2011 3:39 pm ]
Post subject:  Re: ZigZag breakdance

how about the performance as your past manual trading experience ? :?:
Author:  lhDT [ Wed Dec 07, 2011 3:47 pm ]
Post subject:  Re: ZigZag breakdance

Performance is quite good but patience is a key and to be honest I like when things move fast :)
It is one or two trades per day max.
If I followed that strategy 100% I should get around 80% winning trades but I was more trying to catch pullbacks or S/R trades than real breaks.
Author:  lhDT [ Wed Dec 07, 2011 5:27 pm ]
Post subject:  Re: ZigZag breakdance

Code for an EA. (logic is done).

Function to get the last 3ZigZag points

Code: Select all

void getZigZag()
{
   int backBars = 2000;
   int loops = 0;
   for(x=0;x<=backBars;x++)
   {
      double zig = iCustom(NULL, 0, "ZigZag SG",13,5,5,0,0+x);
      if(zig != 0)   { zigTest[loops] = zig; loops++; }  
      if(loops==3){ break; }
   }
}
Code to get the values :

Code: Select all

getZigZag();
   if(zigTest[1]>zigTest[2]) { zigHigh = zigTest[1]; zigLow = zigTest[2]; } else { zigHigh = zigTest[2]; zigLow = zigTest[1]; }
   hlPips = (zigHigh-zigLow)*10000;
   StopLoss = hlPips/2; 
   nextBuyPrice = zigHigh+(zigHigh-zigLow)/10;
   nextSellPrice = zigLow-(zigHigh-zigLow)/10;
Code to trigger for a long position :

Code: Select all

Ask > nextBuyPrice
Code to trigger for a long position :

Code: Select all

Bid > nextSellPrice
The code isn't probably optimized but the logic is there.
I tried to put that in the Steve's Shell but there are way too much values I don't understand :)
Steve, if you have time could you please try ?

Thanks,
Lionel
Author:  AnotherBrian [ Sun Feb 26, 2012 5:55 am ]
Post subject:  Re: ZigZag breakdance

Is this sort of like supply demand trading breakouts as Sam Seiden teaches? Don't take the breakout but take the re-test? Do you also take trades that come into the "zones"?
All times are UTC Page 1 of 1