<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lei Chen</title>
    <description>The latest articles on DEV Community by Lei Chen (@leichenbuilds).</description>
    <link>https://dev.to/leichenbuilds</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4218649%2Ff7c8da51-6e8e-4089-8923-2e4269d4ec7a.png</url>
      <title>DEV Community: Lei Chen</title>
      <link>https://dev.to/leichenbuilds</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/leichenbuilds"/>
    <language>en</language>
    <item>
      <title>I built a Pine Script Python transpiler — and just opened it up for paying users</title>
      <dc:creator>Lei Chen</dc:creator>
      <pubDate>Sat, 31 Oct 2026 08:37:43 +0000</pubDate>
      <link>https://dev.to/leichenbuilds/i-built-a-pine-script-python-transpiler-and-just-opened-it-up-for-paying-users-o8h</link>
      <guid>https://dev.to/leichenbuilds/i-built-a-pine-script-python-transpiler-and-just-opened-it-up-for-paying-users-o8h</guid>
      <description>&lt;p&gt;Hi dev.to — I'm Ray, a retail trader with a day job, and this is my weekend side project: Pine2Py (pine2py.com).&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;— Ray&lt;/p&gt;

</description>
      <category>python</category>
      <category>sideprojects</category>
      <category>buildinpublic</category>
      <category>trading</category>
    </item>
  </channel>
</rss>
