aurora — Strategy by bettencourt37
By version
Performance Metrics
- Author: version
- Symbol: CME_MINI:MES1!
- Timeframe: 1 week
- Net P&L: +13,086.25 USD (+13.09%)
- Win Rate: 81.8%
- Profit Factor: 4.595
- Max Drawdown: 4,600.00 USD (4.38%)
- Total Trades: 11
Description
//version=6strategy("AURORA PRIME — MAX CAGR v3", overlay=true, initial_capital=100000, pyramiding=2, process_orders_on_close=true)//----------------------------------------------------// INPUTS//----------------------------------------------------baseRisk = input.float(0.6, "Base Risk %", step=0.1)expRisk = input.float(0.9, "Expansion Risk %", step=0.1)atrLen = input.int(14, "ATR Length")stopATRmult = input.float(1.5, "Stop ATR Mult")trailATRmult = input.float(2.0, "Trail ATR Mult")adxLen = input.int(14, "ADX Length")adxThresh = input.float(22, "ADX Trend Threshold")volMult = input.float(1.5, "Volume Expansion Mult")//----------------------------------------------------// CORE INDICATORS//----------------------------------------------------atr = ta.atr(atrLen)ema200 = ta.ema(close, 200)// --- Manual ADX Calculation ---upMove = high - high[1]downMove = low[1] - lowplusDM = (upMove > downMove and upMove > 0) ? upMove : 0minusDM = (downMove > upMove and downMove > 0) ? downMove : 0trur = ta.rma(ta.tr(true), adxLen)plusDI = 100 * ta.rma(plusDM, adxLen) / trurminusDI = 100 * ta.rma(minusDM, adxLen) / trurdx = 100 * math.abs(plusDI - minusDI) / (plusDI + minusDI)adx = ta.rma(dx, adxLen)volPower = volume / ta.sma(volume, 20)volExpansion = volPower > volMulttrendRegime = adx > adxThreshexpansionRegime = trendRegime and volExpansion// Structure bias (HTF)htfClose = request.security(syminfo.tickerid, "60", close)htfEMA = request.security(syminfo.tickerid, "60", ta.ema(close, 50))bullBias = htfClose > htfEMAbearBias = htfClose ema200shortSignal = bearBias and trendRegime and close 0 ? riskCash / stopDist : 0//----------------------------------------------------// EXECUTION//----------------------------------------------------longSL = close - stopDistshortSL = close + stopDist// 2R partiallongTP1 = close + stopDist * 2shortTP1 = close - stopDist * 2// ATR trailtrailLong = atr * trailATRmulttrailShort = atr * trailATRmultif longSignal and strategy.position_size = 0 strategy.entry("AURORA", strategy.short, qty) strategy.exit("TP1", "AURORA", qty_percent=50, limit=shortTP1) strategy.exit("Trail", "AURORA", stop=shortSL, trail_points=trailShort)// Pyramiding logicinLong = strategy.position_size > 0inShort = strategy.position_size = 1 and expansionRegime strategy.entry("AURORA-ADD", strategy.long, qty)if inShort and unrealRShort >= 1 and expansionRegime strategy.entry("AURORA-ADD", strategy.short, qty)plot(ema200, color=color.orange)