Here's one way to do it. Substitute your own definition of trend. Fast = MA(Close, 5); Medium = MA(Close, 25); Slow = MA(Close, 50);
Plot(Close, "Price", colorBlack, styleBar); Plot(Fast, "Fast", colorDarkGreen, styleLine); Plot(Medium, "Medium", colorYellow, styleLine); Plot(Slow, "Slow", colorDarkRed, styleLine); UpTrend = Fast > Medium && Medium > Slow; DnTrend = Fast < Medium && Medium < Slow; Colors = IIF(UpTrend, colorGreen, IIF(DnTrend, colorRed, colorLightGrey)); Plot(1, "", Colors, styleOwnScale | styleArea | styleNoLabel, 0, 1, 0, -1); Mike --- In amibroker@yahoogroups.com, "rvlv" <r...@...> wrote: > > > Hi experts > > I remember having seen an afl > the chartspace is showing green color while price is uptrend and the chart area gets red color if price becomes downtrend, and area gets ash or grey color if price bars have no trend > > I am talking of chart area from top to bottom > > thanks for help > regards > rv >