From Pine Script
For scripts written for TradingView. A real example, how each idea translates, and what to check.
Convert from Pine ScriptConvert
AlgoBarsX reads six other trading languages. Paste a script, and it comes back as readable AlgoBarsX with a note on every line: exact, adapted, or your call.
For scripts written for TradingView. A real example, how each idea translates, and what to check.
Convert from Pine ScriptFor scripts written for MetaTrader. A real example, how each idea translates, and what to check.
Convert from MQL4 and MQL5For scripts written for NinjaTrader. A real example, how each idea translates, and what to check.
Convert from NinjaScriptFor scripts written for TradeStation. A real example, how each idea translates, and what to check.
Convert from EasyLanguageFor scripts written for thinkorswim. A real example, how each idea translates, and what to check.
Convert from thinkScriptFor scripts written for pandas and friends. A real example, how each idea translates, and what to check.
Convert from PythonPaste your code, or pick a file such as .pine, .mq4, .mq5, .cs, .els or .py.
Exact means carried over as is. Adapted means changed, with a note saying how. Your call means a choice is handed back to you.
The compiler describes the result in plain English. Compare that with what your old script did.
This is a real run of the importer. The result compiles. It read 8 lines: 5 carried over exactly, 2 were adapted, and 2 came back as choices for you.
//@version=5strategy("RSI Dip", overlay=true)len = input.int(14, "RSI Length")r = ta.rsi(close, len)if ta.crossover(r, 30)strategy.entry("L", strategy.long)if ta.crossunder(r, 70)strategy.close("L")plot(ta.ema(close, 200), color=color.orange)strategy "RSI Dip"market: EURUSDbars: 1hinput len = 14r = rsi(close, len)when crosses_above(r, 30):buy size: 1 lot, tag: "L"when crosses_below(r, 70):close_all tag: "L"plot ema(close, 200), color: orange| Status | Your line | What happened |
|---|---|---|
| Exact | strategy("RSI Dip", overlay=true) | strategy() became the script header |
| Exact | len = input.int(14, "RSI Length") | input() became an input |
| Exact | r = ta.rsi(close, len) | a calculation was carried over |
| Your call | strategy.entry("L", strategy.long) | strategy.entry() had no size of its own, so it became one lot: set the size or risk you want |
| Adapted | if ta.crossover(r, 30) | an if that places orders became a rule |
| Exact | strategy.close("L") | strategy.close() became close_all |
| Adapted | if ta.crossunder(r, 70) | an if that places orders became a rule |
| Exact | plot(ta.ema(close, 200), color=color.orange) | plot() became plot |
| Your call | strategy(...) | Pine scripts carry no market or bar size, so EURUSD on 1h was filled in: set the ones you want |
Pick a small one. Paste it in. Read what comes back.
Create my free account$0 a month · No card needed · Not a trial
Trading is risky. You can lose money. It is not right for everyone.