Amibroker Afl Collection Now

// ----------------------------------------------------------- // PLOTTING // ----------------------------------------------------------- Plot(C, "Price", colorWhite, styleCandle);

// ----------------------------------------------------------- // LOWER TIMEFRAME MOMENTUM (e.g., Daily) // ----------------------------------------------------------- LTF_MA = MA(C, PeriodMA); LTF_RSI = RSI(RSIPeriod); LTF_MomentumUp = C > LTF_MA AND LTF_RSI > 50; LTF_MomentumDown = C < LTF_MA AND LTF_RSI < 50;

// Trend Zone Background if(ShowZones) styleNoLabel, 0, 1); amibroker afl collection

// Higher Timeframe MA Plot(HTF_MA_Exp, "HTF MA (" + Name() + ")", colorOrange, styleLine | styleThick);

// RSI in separate window rsiColor = IIf(LTF_RSI > RSIOverbought, colorRed, IIf(LTF_RSI < RSIOversold, colorGreen, colorLightGrey)); Plot(LTF_RSI, "RSI (" + RSIPeriod + ")", rsiColor, styleLine | styleThick); Plot(RSIOverbought, "OB", colorRed, styleDashed); Plot(RSIOversold, "OS", colorGreen, styleDashed); LTF_RSI = RSI(RSIPeriod)

// Lower Timeframe MA Plot(LTF_MA, "LTF MA", colorYellow, styleLine | styleDots);

// ----------------------------------------------------------- // USER INPUTS // ----------------------------------------------------------- TF1 = ParamTimeFrame("Higher Timeframe", "Weekly"); TF2 = ParamTimeFrame("Lower Timeframe", "Daily"); LTF_MomentumUp = C &gt

// Optional: Exit signals Buy = ExRem(BuySignal, SellSignal); Sell = ExRem(SellSignal, BuySignal);

ShowSignals = ParamToggle("Show Buy/Sell Signals", "No|Yes", 1); ShowZones = ParamToggle("Show Trend Zones", "No|Yes", 1);

Short = SellSignal; // Example short logic Cover = BuySignal;

// Expand HTF values to current timeframe HTF_MA_Exp = TimeFrameExpand(HTF_MA, TF1, expandFirst); HTF_TrendUp_Exp = TimeFrameExpand(HTF_TrendUp, TF1, expandFirst); HTF_TrendDown_Exp = TimeFrameExpand(HTF_TrendDown, TF1, expandFirst); HTF_RSI_Exp = TimeFrameExpand(HTF_RSI, TF1, expandFirst);