Skip to main content

Trendline Breakout Detector for Amibroker (AFL)

smarth71 6 months ago Amibroker (AFL)

  • Rating:
    0 / 5 (Votes 0)
  • Tags:
    amibroker trendline breakout trading bullish

“This AFL detects breakout points based on trendlines and generates clear bullish and bearish signals. Ideal for traders looking for precise entry and exit points.”

“A simple yet powerful tool that identifies trendline breakouts and highlights potential market reversals. Works on all timeframes.”

“Dynamic trendline breakout indicator with visual alerts for bullish and bearish moves, helping traders make timely decisions.”

Indicator / Formula

Copy & Paste Friendly
// ================================================
// AFL: Simple Trendline Breakout Indicator
// Author: ChatGPT (original)
// Description: Highlights bullish and bearish breakouts
// ================================================

// Inputs
Period = Param("Trend Period", 20, 5, 100, 1);
BreakoutMultiplier = Param("Breakout Multiplier", 1.5, 0.5, 5, 0.1);

// Calculate highs and lows for trendline
HH = HHV(High, Period);
LL = LLV(Low, Period);

// Calculate simple breakout levels
BullishBreakout = HH + (HH - LL) * BreakoutMultiplier * 0.1;
BearishBreakout = LL - (HH - LL) * BreakoutMultiplier * 0.1;

// Signals
Buy = Close > BullishBreakout;
Sell = Close < BearishBreakout;

// Plotting
Plot(Close, "Close", colorBlack, styleCandle);
Plot(BullishBreakout, "Bullish Breakout", colorGreen, styleLine | styleThick);
Plot(BearishBreakout, "Bearish Breakout", colorRed, styleLine | styleThick);

PlotShapes(Buy * shapeUpArrow, colorGreen, 0, Low, -10);
PlotShapes(Sell * shapeDownArrow, colorRed, 0, High, -10);

// Add commentary
Filter = Buy OR Sell;
AddColumn(Close, "Close");
AddColumn(Buy, "Buy Signal");
AddColumn(Sell, "Sell Signal");

4 comments

Leave Comment

Please login here to leave a comment.