Page 7 – Self-improvement trick: make your bot sharpen its strategy over time

Below is a practical routine you can graft onto any no-code stack (TradingView ➜ Make ➜ WunderTrading / 3Commas / Bybit bots, etc.). It revolves around three habits — continuous data capture, scheduled walk-forward re-tests, and automatic parameter pushes — so the bot steadily refines entries, exits and position sizing without manual babysitting.

1 Record everything the bot does

Every filled order should flow into a lightweight performance log—PnL, draw-down, win-rate, exposure by pair, slippage, etc.

  • TradingView: add strategy.order_info.* placeholders to the alert JSON so each fill is sent to Make.

  • Make: point those web-hooks to a Google-Sheet or Airtable module; one row per trade keeps the dataset clean.

  • 3Commas / WunderTrading: both expose trade-history endpoints—GET /ver1.1/accounts/{id}/trades (3Commas) or GET /api/v2/trades (WunderTrading)—that you can poll daily with Make’s HTTP > GET block.

Tip – tag the row with the bot-name + build-date; later you’ll know which settings produced which results.


2 Schedule a walk-forward “mini back-test” every X days

Walk-forward optimisation means you re-optimise on fresh data, then trade the next slice live.

  1. Back-test automatically

    • TradingView has no native API, but the desktop app accepts [CLI flags] to export a strategy-tester CSV. Trigger it with a headless script from Make’s Run script module (paid tier). GitHubarrow-up-right

    • For Python-based bots (Backtrader, BT Gym) call cerebro.run() with updated parameters inside a Make-hosted Cloud Function.

  2. Optimise

    • Feed the CSV into Optuna, Hyperopt or a simple grid-search Google-Sheet; aim to maximise Sharpe while capping max draw-down < 20 %.

  3. Decide

    • If the new settings beat the last live period by your threshold (e.g., +10 % net profit, -5 % DD), mark them “promote”.


3 Push the new parameters to the live bot

  • TradingView alert: parameters live in the JSON body (e.g., atrLen=10, mult=3). Update them by editing the alert via TradingView’s Alerts > More ⋮ > Edit pop-up.

  • 3Commas: call PUT /ver1.1/bots/{id}/update with the new JSON preset; Make’s HTTP module handles the auth header.

  • WunderTrading: use PATCH /api/v2/bots/{id} to swap strategy settings or risk % fields.

  • Bybit / Binance custom bots: update the local config file and send a /reload command through a private Telegram bot you already linked in Make.

Schedule the push immediately after the optimisation scenario finishes.


4 Run a small live “probe” first

Switch the position-size field to 10 % for 24 h; monitor slippage and API errors in your performance sheet. If stable, flip back to 100 % of the bot’s allocated capital bucket.


5 Let the feedback loop roll

Because the log, optimiser and parameter-push sit on timers inside Make, you’ve built a self-improving loop:

Trade ➜ Log ➜ Walk-forward test ➜ Optimise ➜ Push new settings ➜ Trade again

Keep an eye on meta-metrics — how often parameters change, and whether each cycle actually improves risk-adjusted returns. If they flatten out, lengthen the walk-forward window or explore fresh indicators (e.g., add a volatility filter or a regime-switch to SuperTrend).


6 Stay safe while the bot gets smarter

  • Hard-stop equity loss (exchange-side) remains untouched by the loop.

  • API keys stay read-write but IP-whitelisted; refreshing parameters never alters key scope.

  • Manual kill-switch: a one-click toggle in Make that sets a global_pause variable; routers block webhook flows when it’s true.


That’s it. With a handful of scheduled Make scenarios, inexpensive optimisation libraries and the REST endpoints your platforms already expose, your bot learns from fresh market data—no nightly copy-paste, no new code, just continuous sharpening.

If you need help, ask support of the platform you use. They will get you covered. I do it all the time, even after creating 80+ bots.

Last updated