How do i use the inputs for the ZigZag Indicator? - page 4

 

did anyone can told me ?

code that use for identify value of last previous top and bottom of zigzag

 

ZigZag Top And Bottom Numbers

I3enooI3:
did anyone can told me ? code that use for identify value of last previous top and bottom of zigzag

Hi 13,

Earlier you asked about RSI values and finding values for previous bars:

RSI Values:

The last character in the code indicates which BAR to get values from - For example:

RsiCurrent = iRSI(NULL,0,RSIPeriod,0,0); // 0 = Current Bar

RsiBar5 = iRSI(NULL,0,RSIPeriod,0,5); // 5 = Previous 5th Bar Back

Do the same for each bar you want to compare, then add your code to buy/sell trades

Basic code example - if (RsiCurrent > RsiBar5) Then do this;

------------------

ZigZag Numbers:

I have not seen many ZigZag indicators that have numbers for top and bottoms, but there are a number of indicators that use the ZigZag and place numbers at the tops and bottoms. Try do a search for:

Semaphore ZigZags

Eliott Waves

ZUP's

Attached is an indicator called 3_Level_ZZ that has the numbers. Just add your basic ZigZag and match the settings.

Good luck and I hope this helps!

Robert

 

thk so much comiclifeform

but istill have one problem ; can u give me the code to use only last top and buttom , when i try it error with other top/buttom (so confuse to record only last value )

thk

 

Not Familiar With ZigZags

I3enooI3:
thk so much comiclifeform

but i still have one problem ; can u give me the code to use only last top and bottom , when i try it error with other top/bottom (so confuse to record only last value )

thk

Hi 13,

I mentioned before I'm just a novice coder...and in this case, I do not use or understand the ZigZag or other wave indicators I suggested to you, so I may not be able to help you code the "top and bottom", especially without seeing what the code is.

Maybe someone else can help here with ZigZags...and the more detail you can provide...the better others can help you.

In the meantime, the 3_Level_ZZ_Semaphore has buffers you can get values from if that will help you.

Take care,

Robert

 
I3enooI3:
thk so much comiclifeform

but istill have one problem ; can u give me the code to use only last top and buttom , when i try it error with other top/buttom (so confuse to record only last value )

thk

With zig zag its impossible to pin down the exact top and bottom heres is a iCustom call for zig zag in to an Ea

ZZ3=iCustom(NULL,0,"ZigZag",depth,deviation,backstep,0,2);

ZZ2=iCustom(NULL,0,"ZigZag",depth,deviation,backstep,0,1);

then for it to trade you can do something like

if ((ZZ3!=0 || ZZ2!=0) //buy signal

and the same for sell signal,

another way could be(not sure about this one)

if (ZZ3!=High[2] || ZZ2!=High[1]) //buy signal

if (ZZ3!=Low[2] || ZZ2!=Low[1]) //sell signal

but you really need another indicator like maybe cci overbought or oversold to try and get closer to possible top or bottom.

 

i have problem this code

i've problem with zigzag Ea as this code i use zigzag indicator as this close

and identify top and bottom as code below

but it don't work properly

i want to short when it break previous low as red arrow (image attach below)

and buy when break previous high as green arrow (image attach below)

so , can anyone told me what i wrong in this code and what code should i use

Thk

int start()

{

//----

{

double zigzaghigh, zigzaglow, zigzaghighx, zigzaglowx, zigzaghighp;

double zigzaglowp, zigzaghigha, zigzaglowa, pc;

double ticket, total, order;

int h, l;

zigzaghighx=iCustom(NULL,0,"ZigZag",12,5,3,MODE_HIGH,h);

zigzaglowx=iCustom(NULL,0,"ZigZag",12,5,3,MODE_LOW,l);

zigzaghighp=iCustom(NULL,0,"ZigZag",12,5,3,MODE_HIGH,h+1);

zigzaglowp=iCustom(NULL,0,"ZigZag",12,5,3,MODE_LOW,l+1);

zigzaghigha=iCustom(NULL,0,"ZigZag",12,5,3,MODE_HIGH,h-1);

zigzaglowa=iCustom(NULL,0,"ZigZag",12,5,3,MODE_LOW,l-1);

pc=iClose(NULL,0,1);

total=OrdersTotal();

//identify top//

while(h>1)

{

if((zigzaghighx > zigzaghighp) && (zigzaghighx > zigzaghigha))

zigzaghigh=zigzaghighx;

return(0);

}

//identify buttom//

while(l>1)

{

if((zigzaglowx < zigzaglowp) && (zigzaglowx < zigzaglowa))

zigzaglow=zigzaglowx;

return(0);

}

//buy&sell//

if((totalzigzaghigh))

{ticket=OrderSend(Symbol(),OP_BUY,1,Ask,1,0,0,"buy",0,0,Green);

OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES);

Print("buy");

return(0);

}

if((total>0)&&(pc<zigzaglow))

{OrderClose(OrderTicket(),OrderLots(),Bid,1,Red);

Print("sale");

return(0);

}

return;

}

//----

return(0);

}

Files:
pic1.png  33 kb
 

MT4 zigzag indicator parameters - who understands them??

Hello

I don't understand the parameters of the MT 4 ZZ indicator:

depth / deviation / backstep

who can explain them to me?

I assume depth would be number of bars? deviation a %? and backstep no idea...

thanks

 

I always like zig zag, is there any of you guys have a suitable indicators to filter zig zag??

 
perwira:
I always like zig zag, is there any of you guys have a suitable indicators to filter zig zag??

maybe you can use HMA or nolagma indicators to filter false signals of zigzag, RBCI is a another choice.

 

I don't understand why people are so focussed on zz when it repaints.