Your AI drafts the port.The kit makes it prove itselfbar by bar.
For traders with a TradingView Pine script who want it on MetaTrader 5: ten binding gates for the AI you already use, MQL5 skeletons, an offline bar-by-bar compare tool and three worked ports.
Opens soon$24.99one payment, when it opens
We open the sale once every file has been through MetaEditor and the three worked examples through a real MT5 comparison. One email, the day it opens:
- Works with Claude · ChatGPT · Cursor · Gemini
- One payment
- Offline compare tool
- 7-day refund before download
v1.0.0 · Try the comparison ↓
A port is done when both versions agree bar by bar on the same data, or when you can name the reason for every bar where they don't.
Two exports in. The first disagreement out, with its reason.
A 9/21 EMA cross, exported from TradingView and from its MT5 port. Change the port, the server clock and the warm-up, and watch what the comparison finds. The same engine runs inside the kit's offline tool.
time,open,high,low,close,EMA fast,EMA slow,Cross up,Cross down 1791180000,1.09121,1.09124,1.09072,1.09079,1.090862,1.090559,NaN,NaN 1791180900,1.09079,1.09083,1.09058,1.09060,1.090810,1.090563,NaN,NaN 1791181800,1.09060,1.09063,1.09010,1.09028,1.090704,1.090537,NaN,NaN 1791182700,1.09028,1.09043,1.08999,1.09012,1.090587,1.090499,NaN,NaN 1791183600,1.09012,1.09023,1.08996,1.09007,1.090484,1.090460,NaN,NaN
time,server_time,open,high,low,close,b0,b1,b2,b3 1791190800,2026.10.05 09:00:00,1.09121,1.09124,1.09072,1.09079,1.09086577,1.09057784,, 1791191700,2026.10.05 09:15:00,1.09079,1.09083,1.09058,1.09060,1.09081262,1.09057985,, 1791192600,2026.10.05 09:30:00,1.09060,1.09063,1.09010,1.09028,1.09070609,1.09055259,, 1791193500,2026.10.05 09:45:00,1.09028,1.09043,1.08999,1.09012,1.09058887,1.09051327,, 1791194400,2026.10.05 10:00:00,1.09012,1.09023,1.08996,1.09007,1.09048510,1.09047297,,
each compared bar, oldest first · grey agrees · orange disagrees
First disagreement · 2026-10-05 06:00 UTC
- EMA fast ↔ b0: TradingView 1.090862, MT5 1.09086577, gap 0.00000377
- EMA slow ↔ b1: TradingView 1.090559, MT5 1.09057784, gap 0.00001884
Likely reason: Warm-up (a different start or seed) · a reason to name. EMA fast ↔ b0: the two sides disagree on the first 8 compared bars, by less each bar (0.00000377 at the start, 0.00000109 on the last), and agree after 2026-10-05 07:45 UTC. A recursive average (an EMA, an RMA, or what is built on one, like an RSI or Pine's ATR) carries its first value forward: the two histories start on different bars, or seed differently. Load more history on both sides, or compare from the first bar after 2026-10-05 07:45 UTC.
- Warm-up (a different start or seed). EMA slow ↔ b1: the two sides disagree on the first 30 compared bars, by less each bar (0.0000188 at the start, 0.00000128 on the last), and agree after 2026-10-05 13:15 UTC. A recursive average (an EMA, an RMA, or what is built on one, like an RSI or Pine's ATR) carries its first value forward: the two histories start on different bars, or seed differently. Load more history on both sides, or compare from the first bar after 2026-10-05 13:15 UTC.
Sample data: synthetic 15-minute candles, not a market record. Its MT5 history starts 12 bars before the window, TradingView's 300, and its server clock runs 3 hours ahead of UTC. The numbers above come from the same engine as the kit's offline compare tool.
Ten gates your AI is told to pass.
One message (START_HERE_AI.md) wires the pack into Claude, ChatGPT, Cursor or Gemini. Its instructions are to pass the gates in order and never call the port done without a comparison report. You check the last gate yourself: the compare tool gives the verdict, not the AI.
- 01Read the Pine semanticsSay how the script runs: per closed bar, what it reads from history, what rolls back on the live bar, what repaints.
- 02Map every constructA table with one row per Pine call: its MQL5 equivalent and the MQL5 reference page that says so.
- 03Choose the skeletonAn indicator for what draws, an Expert Advisor for what trades; the signal is ported as an indicator first.
- 04Decide on closed barsSignals read the bar that closed (shift 1), never the bar still forming (shift 0).
- 05Sessions and server timeEvery session time is converted to the broker's server clock with a measured offset, both sides of a clock change.
- 06Higher-timeframe alignmentA request.security value is taken from the last closed higher-timeframe bar, as the Pine script takes it.
- 07Compile cleanMetaEditor: no errors and no warnings, on the buyer's own machine.
- 08Export both sidesTradingView's chart data and ExportBuffers.mq5's CSV, same symbol, same timeframe, same dates.
- 09Compare bar by barThe compare tool pairs the bars by time and checks every column within its tolerance, over at least 100 bars, every plot paired.
- 10Name every mismatchEach run of bars that disagree gets a reason, or the port isn't done.
Everything a port needs, nothing it doesn't.
- START_HERE_AI.md · port-kit/SKILL.md
- One message wires the pack into Claude, ChatGPT, Cursor or Gemini. Ten Port Gates your AI is told to pass: it is not to call the port done without a comparison report.
- port-kit/references/
- The Pine → MQL5 map (25 constructs, each with its MetaQuotes and TradingView docs links), closed-bar logic, sessions and server time, higher timeframes, and the catalogue of mismatch reasons.
- port-kit/templates/
- Three MQL5 files: an indicator skeleton, an Expert Advisor skeleton (CTrade, new-bar detection, closed-bar signals) and ExportBuffers.mq5, which writes each bar's time, OHLC and buffers to CSV.
- port-kit/tools/bar-compare.html
- The bar-by-bar compare tool. One file, offline, any browser: timezone offset, per-column tolerance, the first mismatch, likely reasons, and a report to keep.
- examples/
- Three worked ports: EMA cross, RSI levels, Donchian channel. Each with the Pine source, the MQL5 port and the compare steps.
- CHEATSHEET.md
- The Pine → MQL5 map on one page.
A taste of the map
ta.sma(close, n), ta.ema(close, n)iMA(_Symbol, _Period, n, 0, MODE_SMA or MODE_EMA, PRICE_CLOSE) in OnInit(), read with CopyBuffer() docs ↗create the handle once; the first values can differ (another first bar or seed), so compare after the warm-upbarstate.isconfirmedindicator: i < rates_total − 1; EA: a new-bar check, then shift 1 docs ↗shift 0 is the bar still forming; an EA acts on the next bar's first tickrequest.security(sym, "D", x[1], lookahead = barmerge.lookahead_on)the daily bar before the one a bar belongs to: iClose(_Symbol, PERIOD_D1, iBarShift(_Symbol, PERIOD_D1, t) + 1), t = time[i] in an indicator, iTime(_Symbol, _Period, 1) in an EA docs ↗without [1] the Pine script reads the finished day on history; an MT5 indicator could copy that on history, but no live chart, EA or Strategy Tester run can: port the [1] version onlytime(timeframe.period, "0930-1600", "America/New_York")the bar's server time moved by your measured offset, then compared in minutes docs ↗MQL5 has no time-zone database, and TimeGMT() equals server time in the Strategy Testerplot(cond ? low : na, …, plot.style_circles)a DRAW_ARROW buffer holding the price, EMPTY_VALUE elsewhere; PLOT_ARROW picks the symbol docs ↗plot the marker as a price on both sides, so both exports carry it as a number25 rows in the kit, each with its MetaQuotes and TradingView docs links and the date they were read. The MQL5 reference pages linked above were read on 2026-11-01.
For traders with a Pine script and an MT5 account.
It's for you if
- You have a TradingView Pine script, yours or one with open source, and you trade on MetaTrader 5
- You already use Claude, ChatGPT, Cursor or Gemini and want its port held to a test, not taken on trust
- You can install an indicator in MetaTrader 5, run a script on a chart and open a CSV
It's not for you if
- You want the port done for you: see the Port Service instead
- You want a strategy that makes money: the kit checks that two versions agree, nothing more
- You use MT4: the templates are MQL5, and MetaTrader 4 doesn't run them
- Your Pine script is closed or invite-only: you need its source to port it
The kit doesn't convert anything by itself. Your AI drafts the MQL5; you compile it in MetaEditor, export both sides and compare them. Pine runs only on TradingView and MQL5 only on MetaTrader, so the two versions can match bar by bar on the same data and still trade differently: spread, fills and the broker's data are not the chart's. A port that agrees says nothing about whether the rule makes money.
Before you ask.
Does it convert my Pine script automatically?
No. Your AI drafts the port, following the kit's gates and templates. The kit's job is to make the draft prove itself: compile it, export both sides and compare them bar by bar, and name the reason for every bar where they differ.
Which AI do I need?
Any that can read files you give it: Claude (Claude Code or a Project), ChatGPT (attach the files or a custom GPT), Cursor, Windsurf or Gemini. START_HERE_AI.md is one message that wires the pack in; HOW_TO_USE.md has the steps for each.
What do I need besides the kit?
MetaTrader 5 for the MQL5 side, on Windows, or on macOS through MetaQuotes' own installer (MetaTrader 5 help, read 2026-11-01); MetaEditor comes with it. And the TradingView chart your Pine script runs on. TradingView's Download chart data is on the Plus, Premium, Expert and Ultimate plans, not Basic or Essential (TradingView's pricing page, read 2026-11-01). Without it you can still paste a few bars into the compare tool by hand.
Will the MT5 version match TradingView exactly?
On the same data, after the warm-up, the values of a correct port should agree within a small tolerance; where they don't, the compare tool shows the first bar and suggests why (the server clock, a one-bar shift, a higher-timeframe boundary, a different seed). Trading results can still differ: spread, fills and the broker's quotes are not TradingView's.
Does it work with MT4?
No. The templates and examples are MQL5, for MetaTrader 5.
Can I port a strategy, not only an indicator?
Yes: the EA skeleton has CTrade, new-bar detection and closed-bar signals, and it can log each bar's signal to a CSV. The kit ports the signal as an indicator first and compares it, then builds the EA on a signal that already agrees.
License and refund?
A personal, non-exclusive licence: use and change the kit for your own ports, and the ports you build with it are yours; the kit's own files stay private, so don't resell or republish them. Stripe checkout, 7-day refund before download; broken files fixed or refunded anytime.
Let your AI draft it. Make it prove it.
Opens soon$24.99one payment, when it opens
We open the sale once every file has been through MetaEditor and the three worked examples through a real MT5 comparison. One email, the day it opens:
Pine → MT5 Port Kit is an educational AI skill pack: workflows, MQL5 templates, worked examples and an offline compare tool. It is not a converter, not financial advice and not a signal service. Ports your AI writes with it are drafts you compile, compare and test yourself; agreement between two versions is not evidence that a rule makes money. Trading involves risk. TradingView and Pine Script are trademarks of TradingView, Inc.; MetaTrader, MetaEditor and MQL5 are trademarks of MetaQuotes Ltd.; this product is independent and not made or endorsed by either. © 2026 ProEA Lab.