help to return ZigZag values[solved]

 

Time ago, I used zigzag values, to reset another indicator value every high/low;

Unfortunately the work was lost;

every zigzag, the zigzag indicator returned than an zigzag occurred, so the sum on second indicator gone resetted;


I don't remember the procedure, the trick or which zigzag indicator I used of all disponible;

maybe I found an zigzag indicator that has this features(return something each zigzag);

It's strange that I didn't wast so much time to solution;


any suggestion?

 

Hi,


some open/close example, to use built in ZigZag indicator:

double zz_h_0 =iCustom (NULL,0,"ZigZag", 12,5,3, 1,0);
double zz_h_1 =iCustom (NULL,0,"ZigZag", 12,5,3, 1,1);
double zz_h_2 =iCustom (NULL,0,"ZigZag", 12,5,3, 1,2);

double zz_l_0 =iCustom (NULL,0,"ZigZag", 12,5,3, 2,0);
double zz_l_1 =iCustom (NULL,0,"ZigZag", 12,5,3, 2,1);
double zz_l_2 =iCustom (NULL,0,"ZigZag", 12,5,3, 2,2);



if (!Use_Trailing && OrdersTotal() !=0 && ( ( zz_h_0>0 || zz_l_0>0) ) ) CloseOrders(Magic);

if ( zz_l_1 ==0 && zz_l_2>0 ) OrderSend(Symbol(), OP_BUY, lots, Ask, 3, zz_l_2, TP, "", Magic, 0, Blue);

AttisCode

 
Thaks that's what I need, but what's mean the last 2 parameters?
Reason: