Category Other  Published on 24/05/2013

ZigZag

Description

The zigzag is an Indicator that is usually used as a filter of small price momements.

 


u

KK
kkostaki

Joined on 24.08.2012

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: ZigZag.algo
  • Rating: 5
  • Installs: 26166
Comments
Log in to add a comment.
TY
tynamite · 9 years ago

Hi,

could you please give us the indicator without bugs to download ?

Thanks for your support !

EL
Elogos · 9 years ago

Sorry, AUDUSD not EURUSD.

EL
Elogos · 9 years ago

bfis108137 

 

- A bit late, but yeah there is a bug with it.

2010/10/30 12:15 UTC M15 EURUSD

Made a lower low, it should not have since it was in the catchment for the low, but at the same time made a new high also, (but obviously later moved with higher being made).

KK
kkostaki · 11 years ago
You need to remove Source from the initialization: _zigZag = Indicators.GetIndicator(ZzDepth, ZzDeviation, ZzBackStep);
BF
bfis108137 · 11 years ago
There is a bug in this indi. I don't know if anyone has noticed but sometimes there will be a bar that has made a lower low on the bottom or a higher high on the top within a few bars and the zigzag will not establish itself for that new higher high or lower low.
PH
phamvanthanh · 11 years ago
Hi kkostaki, I am trying to use zigzag as trend like others but I do not know why it is not working right. Could you please help me? below is my code protected override void OnStart() { // _matype = MovingAverageType.Simple; _zigZag = Indicators.GetIndicator(Source, ZzDepth , ZzDeviation, ZzBackStep); } protected override void OnBar() { if (Trade.IsExecuting) return; int lastindex = _zigZag.Result.Count - 2; int previndex = _zigZag.Result.Count - 3; lastValue = _zigZag.Result[lastindex]; prevValue = _zigZag.Result[previndex]; bool isLongPositionOpen = position != null && position.TradeType == TradeType.Buy; bool isShortPositionOpen = position != null && position.TradeType == TradeType.Sell; if (lastValue > prevValue && !isLongPositionOpen) { ClosePosition(); Buy(); } if (lastValue < prevValue && !isShortPositionOpen) { ClosePosition(); Sell(); } } thanks in advance