You have to go back through the bars to find the ZigZag points, the Indicator buffer will have a value when there is a ZigZag. When you find it yo can compare it against the MA value you want to use . .
thank you
I write code
double zigzag; int k=0; int i=0; while(k<4){ if(iCustom("GBPUSBpro",PERIOD_M15,"ZigZag",12,5,3,0,i)!=0){ zigzag[k]=iCustom("GBPUSBpro",PERIOD_M15,"ZigZag",12,5,3,0,i); k++; } i++; } if ( zigzag < iMA("GBPUSBpro",PERIOD_M15,7,0,MODE_EMA,PRICE_CLOSE,0) ) ) { BUY("GBPUSBpro",B_GBPUSBpro_LS_0,B_GBPUSBpro_TP_0,B_GBPUSBpro_SL_0,B_GBPUSBpro_TS_0,"if ( ( zigzag < iMA(GBPUSBpro,PERIOD_M15,21,0,MODE_EM...") ;}
but it do not run
can u help me
axbc:
Don't check if the value returned by iCustom() is not equal to 0 check if it is less than EMPTY_VALUE
thank you
I write code
but it do not run
can u help me
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
zigzag = iCustom("EURUSDpro",PERIOD_M15,"ZigZag",12,5,3,0,0)
MA = iMA("EURUSDpro",PERIOD_M15,7,0,MODE_EMA,PRICE_CLOSE,0)
help me. how to zigzag with MA
If zigzag < MA ==> buy
If zigzag >MA ==> sell
thanks