Skip to main content

ATR Band & Volume Bands (Ribbon) with Cross over of Averages for Amibroker (AFL)

tgbssk 24 days ago Amibroker (AFL)

  • Rating:
    0 / 5 (Votes 0)
  • Tags:
    amibroker, atr, EMA, MA, WMA, macd, volume, bands, band, ribbon

ATR & Volume Bands with Cross over of Averages
By Abhimanyu Y. Altekar 21/05/2026 abhimanyu.altekar@gmail.com
In the memory of my deceased Mother
First Match ve / -ve Cross Over of Averages.
1) BUY = When +ve Cross over of Averages takes place and Green candle has closed above it verify ribbons with Green
Blue at same time
2) Sell = When -ve Cross over of Averages takes place and Red candle has closed Below it verify ribbons with Pink+Red at same time

Screenshots

Indicator / Formula

Copy & Paste Friendly

Additionally suggested to use MACD, RSI, CCI Volume Chart etc.

// ATR & Volume Bands with Cross over of Averages
// By Abhimanyu Y. Altekar 21/05/2026 abhimanyu.altekar@gmail.com
// In the memory of my deceased Mother 
// First Match +ve / -ve Cross Over of Averages.
// BUY = When +ve Cross over of Averages takes place and Green candle has closed above it verify ribbons with Green+Blue at same time
// Sell = When -ve Cross over of Averages takes place and Red candle has closed Below it verify ribbons with Pink+Red at same time

// 1. Calculate Relative Volume 
WTC_VolAvg = MA(Volume, 15); 
WTC_RVol   = Volume / WTC_VolAvg;

// 2. Trend Direction based on Price & Averages
WTC_TrendPlus  = Close > EMA(C,15) AND Close > Ref(Close, -1) AND WTC_RVol > 1.2;
WTC_TrendMinus = Close < EMA(C,30) AND Close < Ref(Close, -1) AND WTC_RVol > 1.2;

// 3. Define Dynamic Colors for the Stock Band (Volume)
WTC_StockBandColor = IIf(WTC_TrendPlus, colorGreen, IIf(WTC_TrendMinus, colorRed, colorLightGrey));

// 4. Plotting the Stock Band Ribbon at the bottom of the chart
Plot(2, "", WTC_StockBandColor, styleOwnScale | styleArea | styleNoLabel, 0, 100, 0, 1, -20);
Plot(2, "", colorBlack, styleOwnScale | styleThick | styleDots | styleNoLabel, 0, 100, 0, 1, -20);

// 5. ATR Efficiency Band for Stocks
WTC_ATR_Period = 15;
WTC_Current_Range = High - Low;
WTC_Avg_ATR = ATR(WTC_ATR_Period);

// Check if current bar has higher volatility than average
WTC_Volatility_Burst = WTC_Current_Range > WTC_Avg_ATR;

// Combine with Price Action
WTC_ATR_Bullish = WTC_Volatility_Burst AND Close > EMA(C,15) AND Close > Ref(Close, -1);
WTC_ATR_Bearish = WTC_Volatility_Burst AND Close < EMA(C,30) AND Close < Ref(Close, -1);

// Assign Dynamic Colors for the ATR Ribbon
WTC_ATRB_Color = IIf(WTC_ATR_Bullish, colorBlue, IIf(WTC_ATR_Bearish, colorCustom12, colorLightGrey));

// Plotting the ATR Band Ribbon just above the Volume Ribbon
Plot(4, "", WTC_ATRB_Color, styleOwnScale | styleArea | styleNoLabel, 0, 100, 0, 1, -20);

// 6. Main Price and Moving Averages Plotting
Plot(C, "Close", colorBlack, styleCandle);
Plot(EMA(C,15), "EMA15", colorGreen, styleLine | styleThick);
Plot(EMA(C,30), "EMA30", colorOrange, styleLine | styleThick);

0 comments

Leave Comment

Please login here to leave a comment.