Download MetaTrader 5
To add comments, please log in or register
Do you need a programmer? Make an order to let the developer find you!
fly7680
492
fly7680 2016.06.20 10:09 
Hello, I should fix the arrow when the moving average crossed the fractal channel as written in code. The problem is that if you create another minimum on the first tick of the candle 0, the arrow is not present.
How can I fix?

Thank you


if(iMA(NULL, PERIOD_CURRENT, MediaM_Periodo, 0, MODE_EMA, PRICE_CLOSE, 2+i) > iCustom(NULL, PERIOD_CURRENT, "FractalChannel", 1, 2+i)  //Moving Average > FractalChannel  
&& iMA(NULL, PERIOD_CURRENT, MediaM_Periodo, 0, MODE_EMA, PRICE_CLOSE, 1+i) < iCustom(NULL, PERIOD_CURRENT, "FractalChannel", 1, 1+i)  //Moving Average < FractalChannel
)
 {
  Buffer1[i] = High[i] + Distanza_Icona * myPoint; //Set indicator value at Candlestick High + fixed value
 }



Files:
/
To add comments, please log in or register