Importing from other languages

Pine Script, MQL4 and MQL5, NinjaScript, EasyLanguage, thinkScript and Python.

Paste a script from another platform and AlgoBarsX works out the language, parses the source, maps each construct, and compiles the result before calling it done. An import that does not compile says so.

ReadsNotes
Pine ScriptStrategies and indicators.
MQL4 and MQL5Expert advisors. OnTick becomes the script body, and OrderSend becomes an order with its stop and target attached.
NinjaScriptOnBarUpdate carries over. The C# around it comes back as notes.
EasyLanguageTradeStation strategies.
thinkScriptStudies and conditions.
Pythonbacktrader, freqtrade, and plain pandas with pandas-ta or TA-Lib.

Every line comes back with one of three statuses: exact (carried over as is), adapted (changed, with a note saying how), or your call (a decision handed back to you, with the original kept as a comment).

What you paste · Pine Script
//@version=5
strategy("EMA Cross", overlay=true)
fast = input.int(20, "Fast")
slow = input.int(50, "Slow")
if ta.crossover(ta.ema(close, fast), ta.ema(close, slow))
strategy.entry("Long", strategy.long)
if ta.crossunder(ta.ema(close, fast), ta.ema(close, slow))
strategy.close("Long")
What you get back
1strategy "EMA Cross"
2market: EURUSD
3bars: 1h
4
5input fast = 20
6input slow = 50
7
8when crosses_above(ema(close, fast), ema(close, slow)):
9buy size: 1 lot, tag: "Long"
10
11when crosses_below(ema(close, fast), ema(close, slow)):
12close_all tag: "Long"
StatusYour lineWhat happened
Exactstrategy("EMA Cross", overlay=true)strategy() became the script header
Exactfast = input.int(20, "Fast")input() became an input
Exactslow = input.int(50, "Slow")input() became an input
Your callstrategy.entry("Long", strategy.long)strategy.entry() had no size of its own, so it became one lot: set the size or risk you want
Adaptedif ta.crossover(ta.ema(close, fast), ta.ema(close, slow))an if that places orders became a rule
Exactstrategy.close("Long")strategy.close() became close_all
Adaptedif ta.crossunder(ta.ema(close, fast), ta.ema(close, slow))an if that places orders became a rule
Your callstrategy(...)Pine scripts carry no market or bar size, so EURUSD on 1h was filled in: set the ones you want
Always read an import before you run it. Other platforms leave things unsaid that AlgoBarsX makes explicit, such as the market, the bar size and the position size. Those come back as decisions for you. Check the plain-English description against what your original did, and backtest before you deploy.

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account