// Downloaded From https://www.WiseStockTrader.com // ================================================ // 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");