// Quiet Range Upturn // ProRealAlgos // Platform: ProRealTime (ProBuilder) - the original code // Selected on: DAX, 30-minute bars // // Backtests are not live results. General information, not advice. The decision is always yours. // DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade stopLossPoints = 80 // protective stop takeProfitPoints = 150 // profit target channelPeriod = 20 // bars for the channel high and low superTrendMultiplier = 1.5 // SuperTrend ATR multiplier superTrendPeriod = 18 // SuperTrend ATR length maxRangeRatio = 0.5 // signal bar range must be under this share of the channel // --- Indicators --- channelHigh = Highest[channelPeriod](high) channelLow = Lowest[channelPeriod](low) superTrendValue = SuperTrend[superTrendMultiplier, superTrendPeriod] smallBar = (high - low) / (channelHigh - channelLow) < maxRangeRatio // --- Entry rules --- // A new low that fails: the channel floor just dropped, yet this bar closes up, // stays under the channel high and holds above the SuperTrend. longSignal = channelLow[1] < channelLow[2] AND high < channelHigh[1] AND close > open AND smallBar AND close > superTrendValue IF longSignal THEN BUY positionSize CONTRACT AT MARKET ENDIF // --- Exit rules --- SET STOP PLOSS stopLossPoints SET TARGET PPROFIT takeProfitPoints