{"examples":[{"name":"breakout-session.json","spec":{"specVersion":"1.0","meta":{"name":"London Session Breakout","description":"During the London open, trade breakouts of the previous bar's range. ATR-scaled stops, spread guard, cooldown to avoid over-trading the same move.","symbol":"GBPUSD","timeframe":"M5","evaluateOn":"barClose"},"indicators":[{"id":"atr_14","type":"ATR","params":{"period":14}}],"risk":{"maxLot":0.3,"maxOpenPositions":2,"maxDailyLossPct":6,"maxSpreadPoints":20,"slippagePoints":10},"sessions":{"enabled":true,"timezone":"UTC","windows":[{"days":["mon","tue","wed","thu","fri"],"from":"07:00","to":"10:00"}]},"rules":[{"id":"break_high","when":"price.close > price.high[1] && spread <= 20","cooldownBars":12,"actions":[{"type":"openTrade","side":"buy","lot":0.1,"sl":{"mode":"atr","indicator":"atr_14","multiplier":1},"tp":{"mode":"atr","indicator":"atr_14","multiplier":2},"tag":"london_breakout"}]},{"id":"break_low","when":"price.close < price.low[1] && spread <= 20","cooldownBars":12,"actions":[{"type":"openTrade","side":"sell","lot":0.1,"sl":{"mode":"atr","indicator":"atr_14","multiplier":1},"tp":{"mode":"atr","indicator":"atr_14","multiplier":2},"tag":"london_breakout"}]}]}},{"name":"ma-crossover.json","spec":{"specVersion":"1.0","meta":{"name":"EMA 9/21 Crossover","description":"Classic trend-following: go long when the fast EMA crosses above the slow EMA, short on the opposite cross. Always flat-to-reverse.","symbol":"EURUSD","timeframe":"M15","evaluateOn":"barClose"},"indicators":[{"id":"ema_fast","type":"EMA","params":{"period":9,"appliedPrice":"close"}},{"id":"ema_slow","type":"EMA","params":{"period":21,"appliedPrice":"close"}}],"risk":{"maxLot":0.2,"maxOpenPositions":1,"maxDailyLossPct":5,"maxSpreadPoints":25,"slippagePoints":10},"rules":[{"id":"long_cross","when":"crossesAbove(ema_fast, ema_slow)","actions":[{"type":"closeTrade","target":"short"},{"type":"openTrade","side":"buy","lot":0.1,"sl":{"mode":"points","value":300},"tp":{"mode":"points","value":600}}]},{"id":"short_cross","when":"crossesBelow(ema_fast, ema_slow)","actions":[{"type":"closeTrade","target":"long"},{"type":"openTrade","side":"sell","lot":0.1,"sl":{"mode":"points","value":300},"tp":{"mode":"points","value":600}}]}]}},{"name":"rsi-pullback-news.json","spec":{"specVersion":"1.0","meta":{"name":"RSI Pullback with Trend Filter","description":"Buy oversold pullbacks while price is above the 200 EMA, scale stops to volatility with ATR, avoid high-impact USD news, and alert on Telegram. Showcases indicators, expressions, news filter, sessions, position management, risk-based sizing.","symbol":"XAUUSD","timeframe":"H1","evaluateOn":"barClose"},"indicators":[{"id":"rsi_14","type":"RSI","params":{"period":14,"appliedPrice":"close"}},{"id":"ema_200","type":"EMA","params":{"period":200,"appliedPrice":"close"}},{"id":"atr_14","type":"ATR","params":{"period":14}}],"risk":{"maxLot":0.5,"maxOpenPositions":1,"maxDailyLossPct":4,"maxSpreadPoints":50,"slippagePoints":15},"newsFilter":{"enabled":true,"currencies":["USD"],"minImpact":"high","blockBeforeMin":30,"blockAfterMin":15,"action":"no_new_trades"},"sessions":{"enabled":true,"timezone":"UTC","windows":[{"days":["mon","tue","wed","thu","fri"],"from":"07:00","to":"20:00"}]},"positionManagement":{"breakeven":{"enabled":true,"triggerPoints":300,"offsetPoints":20},"trailingStop":{"enabled":true,"mode":"atr","indicator":"atr_14","multiplier":2,"step":50}},"rules":[{"id":"long_entry","when":"price.close > ema_200 && rsi_14 < 35 && rsi_14[1] >= 35 && positions.open == 0","actions":[{"type":"openTrade","side":"buy","lot":{"mode":"riskPercent","value":1},"sl":{"mode":"atr","indicator":"atr_14","multiplier":1.5},"tp":{"mode":"atr","indicator":"atr_14","multiplier":3},"tag":"rsi_pullback"},{"type":"alert","channel":"telegram","message":"🟢 Long {symbol} @ {price.ask} | RSI {rsi_14}"}]},{"id":"exit_overbought","when":"rsi_14 > 70","actions":[{"type":"closeTrade","target":"long"},{"type":"alert","channel":"telegram","message":"⚪ Closed long {symbol}: RSI overbought ({rsi_14})"}]}]}},{"name":"straddle-scaleout.json","spec":{"specVersion":"1.0","meta":{"name":"Breakout Straddle with Scale-Out","description":"At the London open, arm an ATR-sized buy-stop above and sell-stop below price. Scale out half a position into RSI extremes, and cancel any unfilled pending orders by mid-session. Showcases pending orders, expirations, partial closes, and cancelPending.","symbol":"GBPUSD","timeframe":"M15","evaluateOn":"barClose"},"indicators":[{"id":"atr_14","type":"ATR","params":{"period":14}},{"id":"rsi_14","type":"RSI","params":{"period":14,"appliedPrice":"close"}}],"risk":{"maxLot":0.3,"maxOpenPositions":2,"maxDailyLossPct":5,"maxSpreadPoints":25,"slippagePoints":10},"sessions":{"enabled":true,"timezone":"UTC","windows":[{"days":["mon","tue","wed","thu","fri"],"from":"07:00","to":"10:00"}]},"rules":[{"id":"arm_straddle","when":"positions.open == 0","cooldownBars":8,"actions":[{"type":"openPending","side":"buy","pending":"stop","price":{"mode":"atr","indicator":"atr_14","multiplier":1},"lot":0.1,"sl":{"mode":"atr","indicator":"atr_14","multiplier":1.5},"tp":{"mode":"atr","indicator":"atr_14","multiplier":3},"expireMinutes":120,"tag":"straddle"},{"type":"openPending","side":"sell","pending":"stop","price":{"mode":"atr","indicator":"atr_14","multiplier":1},"lot":0.1,"sl":{"mode":"atr","indicator":"atr_14","multiplier":1.5},"tp":{"mode":"atr","indicator":"atr_14","multiplier":3},"expireMinutes":120,"tag":"straddle"}]},{"id":"scale_out_long","when":"rsi_14 > 70 && positions.long > 0","actions":[{"type":"closeTrade","target":"long","amount":{"mode":"percent","value":50}},{"type":"alert","channel":"telegram","message":"Scaled out 50% of longs on {symbol} @ {price.bid} (RSI {rsi_14})"}]},{"id":"scale_out_short","when":"rsi_14 < 30 && positions.short > 0","actions":[{"type":"closeTrade","target":"short","amount":{"mode":"percent","value":50}}]},{"id":"clear_pending_midday","when":"time.hour >= 10","actions":[{"type":"cancelPending","target":"all"}]}]}}]}