Documentation
¶
Overview ¶
Command trendagent runs the trend following strategies: trendconfluence (RK Trend Confluence), matrend (MA Trend: the break of the SMA 200 with the EMA 9/21 on its side), emapullback (the pullbacks to the fast EMA in a trend of two EMAs), fibonacci (the pullbacks of the impulses to their Fibonacci retracements), trendpullback (the end of the pullbacks of the trend of the EMA 9/21 over the SMA 200, confirmed by the momentum: the rules of the setup trend_pullback of the prompt default of the LLM agent, its stop loss moved by the R multiple of the position), and the signal strategies emacross, ema200, ribbon, supertrend, emasupertrend, psarema, atrtrailing, ichimoku, ichimokuadx, mtftrend and mtfema, see strategies.NewSignal, and consensus (a quorum of the rules of the signal strategies firing the same side within a few candles, none of them the other side), see strategies.NewConsensus. See runner.Run for the shared flags:
# RK Trend Confluence, a stop on the close 3 ATR from the entry, backed up # by a stop placed at the broker 4 ATR away go run ./agents/trendagent -mode paper -pair XAUUSDm -lot 0.01 \ -stop-atr 3 -broker-stop-atr 4 # the same with trailing stops: 3 ATR behind the best price on the close, # and 4 ATR at the broker, moved there on every candle close go run ./agents/trendagent -mode paper -pair XAUUSDm -lot 0.01 \ -trailing-atr 3 -broker-trailing-atr 4 # MA Trend: the close breaking the SMA 200 with the EMA 9/21 already on its # side, at most 2% from it, the stop 1 ATR beyond the SMA 200 then 3 ATR # behind the best price, also placed at the broker go run ./agents/trendagent -strategy matrend -mode paper -pair XAUUSDm -lot 0.01 \ -max-distance 2 -stop-buffer-atr 1 -trailing-atr 3 -broker-stop # the pullbacks to the EMA 20 in the trend of the EMA 20/50, on 15m go run ./agents/trendagent -strategy emapullback -mode paper -pair BTCUSDm \ -timeframe 15m -lot 0.01 # the pullbacks to 50%-61.8% of the impulses of 3 ATR between swings of 5 # candles, on 15m, the stop loss beyond 78.6% and the take profit at the # extreme of the impulse; then a limit at 61.8% with the target at the # extension 1.618, the impulses on the side of the EMA 200 only go run ./agents/trendagent -strategy fibonacci -mode paper -pair XAUUSDm -lot 0.01 go run ./agents/trendagent -strategy fibonacci -mode paper -pair XAUUSDm -lot 0.01 \ -fib-trigger limit -fib-target extension -fib-target-level 1.618 -fib-trend-ema 200 # the Supertrend flips on 1h, next to the bot of 5m of the same strategy go run ./agents/trendagent -strategy supertrend -mode paper -pair BTCUSDm \ -timeframe 1h -lot 0.01 -mt5-comment nb:supertrend-1h # 3 of the rules ema200, supertrend, macdtrend, adxema and donchian buying # within 3 candles of 15m, none of them selling there; then 2 of 3 rules # on the same candle of 1h, the stop loss trailing 3 ATR behind go run ./agents/trendagent -strategy consensus -mode paper -pair XAUUSDm -lot 0.01 go run ./agents/trendagent -strategy consensus -mode paper -pair XAUUSDm -lot 0.01 \ -timeframe 1h -consensus-rules ema200,supertrend,donchian -consensus-quorum 2 \ -consensus-window 1 -trailing-atr 3
Launched by the controller, the live mode takes the same flags from the settings of the agent in its database.