<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lei Chen]]></title><description><![CDATA[Lei Chen]]></description><link>https://leichenbuilds.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 02:25:12 GMT</lastBuildDate><atom:link href="https://leichenbuilds.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[I built a Pine Script → Python transpiler — and just opened it up for paying users]]></title><description><![CDATA[Hi there — I'm Ray, a retail trader with a day job, and this is my weekend side project: Pine2Py (pine2py.com). The problem was my own. I'd prototype a…]]></description><link>https://leichenbuilds.hashnode.dev/i-built-a-pine-script-python-transpiler-and-just-opened-it-up-for-paying-users</link><guid isPermaLink="true">https://leichenbuilds.hashnode.dev/i-built-a-pine-script-python-transpiler-and-just-opened-it-up-for-paying-users</guid><category><![CDATA[Python]]></category><category><![CDATA[sideproject]]></category><category><![CDATA[buildinpublic]]></category><category><![CDATA[trading, ]]></category><dc:creator><![CDATA[Lei Chen]]></dc:creator><pubDate>Sat, 31 Oct 2026 08:42:25 GMT</pubDate><content:encoded><![CDATA[<p>Hi there — I'm Ray, a retail trader with a day job, and this is my weekend side project: Pine2Py (pine2py.com).</p>
<p>The problem was my own. I'd prototype a strategy in Pine Script on TradingView, then want to backtest it properly in Python — on my own data, across more symbols, with parameters swept systematically. Hand-rewriting worked, but every rewrite risked quietly changing the strategy's logic, and I never fully trusted a backtest of code that might not be the strategy I charted.</p>
<p>So I built the converter I wanted. It's a real transpiler — a full Pine front-end parser, not regex find-and-replace. Paste a Pine Script v5 or v6 indicator or strategy, get back a single readable Python file (types annotated, structure preserved) that runs bar-by-bar on your own OHLCV data through the PyneCore runtime.</p>
<p>Some numbers, because specifics matter: I tested it against a corpus of 1,909 real-world scripts. In my testing, 99.7% compile and 98.4% fully translate. The rest fail loudly with diagnostics — I'd rather tell a user "this construct isn't supported" than hand them subtly wrong code and a backtest they can't trust.</p>
<p>The least obvious lesson of the project: a transpiler is only as correct as the runtime under it. Two classes of scripts crashed because of bugs in the stock runtime, not in my translation. I ended up shipping a patched runtime build alongside the converter (free download on the site) and being explicit that stock PyPI PyneCore isn't supported. Testing the translator + runtime as a pair, on adversarial scripts, is the thing I'd do from day one if I started over.</p>
<p>Monetisation, kept deliberately simple: a free account (sign-in by email code, no password, no card) includes 3 conversions. Pro is $12/month for unlimited, paid through Paddle. I opened the paid tier a few days ago, so the honest revenue figure right now is: just launched.</p>
<p>It won't make anyone's strategy profitable — it's a converter, not a signal. It just moves your code faithfully so your backtests mean what you think they mean.</p>
<p>If you've ported trading code between languages, or you're building dev tools solo, I'd love to hear what worked for you — and if you try it, throw your ugliest script at it and tell me what breaks. Those reports are how the last few percent got fixed.</p>
<p>— Ray</p>
]]></content:encoded></item></channel></rss>