Add alert + email + place tardes Zigzig indicator - page 3

 

Hi mdalen,

Could you pls help? Thanks

 
rg1983:
Hi mladen ,

Thanks for your reply.

Exact ! the EA will open orders as you write above , for example when CCI signal comes on 8H , the order will open on 12h .

But i need to open orders when signal comes first on the actual bar , in my example on 8h.

concerning the ema condtion , yes there no condition added in this EA , i would like to add it. also would like to add TP, SL and trailing stop.

Many thanks

rg1983

For that simply check the 0th bar (current bar) of cci

 
mladen:

rg1983

For that simply check the 0th bar (current bar) of cci

Thanks! But im not a programmer i dont know how i can do that. I can pay you or donate if you modify this EA to meet my needs listed above.

Many thanks

 

Hi Mladen ,

should i change something here for the 0th bar (current bar) of cci thanks

bool NewBar()

{

static datetime LastTime = 0;

bool ret = Time[0] > LastTime && LastTime > 0;

LastTime = Time[0];

return(ret);

}

 
rg1983:
Hi Mladen ,

should i change something here for the 0th bar (current bar) of cci thanks

bool NewBar()

{

static datetime LastTime = 0;

bool ret = Time[0] > LastTime && LastTime > 0;

LastTime = Time[0];

return(ret);

}

No, Not in that part. But in the call to iCCI.

If you wist to test the still opened bar, then the last parameter should be 0. But get ready to have false signal (you always risk false signals when using still opened bars)

 
mladen:

No, Not in that part. But in the call to iCCI.

If you wist to test the still opened bar, then the last parameter should be 0. But get ready to have false signal (you always risk false signals when using still opened bars)

I have delete the isNewBar and i have added the EMA 200 signal What do you think about that :

Buy order example :

if( iCCI(NULL, PERIOD_CURRENT, 20, PRICE_TYPICAL, 0) < -100 && iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, 0)< Bid

I'm trying i hope you can help thanks

 

Finally succeed to add conditions wooof

I'm trying with Take profit , SL and trailing stop ... Im trying trying I will get it but if you can guide it will be so much appreciated thanks

 
rg1983:
Finally succeed to add conditions wooof I'm trying with Take profit , SL and trailing stop ... Im trying trying I will get it but if you can guide it will be so much appreciated thanks

Happy coding

 
mladen:
Happy coding

Thanks ! How can i close this post! I have tried and it seems all is ok.. I love the MQL4 coding.

 
rg1983:
Thanks ! How can i close this post! I have tried and it seems all is ok.. I love the MQL4 coding.

rg1983

No need to close anything

Reason: