See Your Trading Strategy as a Flowchart

Paste a TradingView Pine Script or a MetaTrader MQL5 expert advisor and get its rules as a flowchart: the indicators it calculates, every condition that enters or exits a trade, and the orders it sends. Then watch a dry run, bar by bar, on sample prices: when it buys, when it sells, and why.

  • Pine Script (TradingView) and MQL5 (MetaTrader 5), detected automatically
  • Entries, exits, stop-losses and take-profits as Yes / No decisions
  • A bar-by-bar dry run on sample prices, with the position and entry price at every step
  • 🛡 Safety check: repainting, look-ahead, missing stop-loss, zero commission and martingale sizing, each with its line and a fix
  • 🧭 Paths shows rules your sample bars never triggered, like a stop-loss that never fires
  • Race two strategies on the same bars to see which does less work
  • Export the flowchart for your trading plan, or present it to your group

How it works

  1. Paste your Pine Script or MQL5 code
  2. The AI draws the strategy as a flowchart
  3. Press ▶ to watch it trade bar by bar on sample prices
  4. Check 🧭 Paths for rules that never fired

Try it with

  • //@version=5 strategy("MA Crossover", overlay=true) fast = ta.sma(close, 9) slow = ta.sma(close, 21) if ta.crossover(fast, slow) strategy.entry("Long", strategy.long) if ta.crossunder(fast, slow) strategy.close("Long")
  • //@version=5 strategy("RSI dip buyer", overlay=true) r = ta.rsi(close, 14) if r < 30 and strategy.position_size == 0 strategy.entry("Long", strategy.long) strategy.exit("Stop", "Long", stop=close * 0.97, limit=close * 1.06) if r > 70 strategy.close("Long")
  • #property strict #include <Trade/Trade.mqh> CTrade trade; void OnTick() { double high = iHigh(_Symbol, PERIOD_H1, 1); double low = iLow(_Symbol, PERIOD_H1, 1); double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK); if (PositionsTotal() == 0 && ask > high) trade.Buy(0.1, _Symbol, ask, low, ask + (ask - low) * 2); }

Frequently asked questions

Which languages work?

TradingView Pine Script (v4 to v6) and MetaTrader MQL5 strategies and expert advisors, detected automatically. MQL4 usually works too, as it is close to MQL5. C, C++, Java, Python and JavaScript also work.

Does it backtest my strategy or use real prices?

No. The dry run uses a few made-up sample bars to show which rule fires when, the way you would trace it on paper. It shows the logic, not profits. Use TradingView’s Strategy Tester or MetaTrader’s tester for real backtests.

Is this trading advice?

No. It explains what a script does; it does not judge whether a strategy is good or predict prices.

Can it tell if a script repaints or cheats in the backtest?

The 🛡 Safety check reads the code for the usual tricks: repainting, request.security look-ahead, entries with no stop-loss, exits that only close winners, zero commission and slippage, and martingale or all-in sizing. Each finding shows its line and a fix. It is an AI review of the code, so forward-test on a demo account too.

Is it free?

Each new flowchart and dry run uses one AI credit, and every free account gets AI credits each month. The MA crossover example on this page opens without an account.

I don’t code. Can I flowchart my trading plan?

Yes. Describe your rules in plain words in the AI flowchart generator (for example “buy when RSI is under 30 and price is above the 200-day average, stop-loss 3% below entry”) and it draws them as a decision flowchart you can edit.

Classic programs with flowchart, algorithm and code

Related tools

Try AI Flowchart free →