Disliked{quote} Hello, thank you for your attention This is not a moving avarage I am learning programming This code is supposed to receive 2 movings and compare their values and change the background color [/code] for (int i = 0; i < rates_total; i++) { MA1_Buffer = iMA(NULL,PERIOD_CURRENT, MA1_Period,1, MODE_EMA, PRICE_CLOSE); MA2_Buffer = iMA(NULL,PERIOD_CURRENT, MA2_Period,1, MODE_LWMA, PRICE_CLOSE); } if (MA1_Buffer[rates_total - 1] > MA2_Buffer[rates_total - 1]) ChartSetInteger(0, CHART_COLOR_BACKGROUND, clrLightGreen); else ChartSetInteger(0,...Ignored
Instead of changing the background color, you could change the color of the moving average lines
Software Developer and Music Producer
News Fundamentals All Time Return:
1,159.1%