Urgent.News

What's breaking now, across thousands of outlets.

Tech

I built a Pine Script Python transpiler — and just opened it up for paying users

Hi dev.to — 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 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…

I, Ray, am a retail trader with a day job, and this is my weekend side project: Pine2Py (pine2py.com). The motivation behind this endeavor was my need to prototype trading strategies in Pine Script on TradingView and then backtest them accurately in Python, using my own data and testing across multiple symbols with systematic parameter sweeps.

While hand-rewriting strategies worked, there was always a risk of unintentionally altering the strategy's logic, and I never fully trusted backtests generated from code that may not have been the exact same as what I had originally charted.

To address this issue, I built the converter I envisioned. It is a genuine transpiler, a comprehensive Pine front-end parser, rather than a simple regex find-and-replace. Users can simply paste a Pine Script v5 or v6 indicator or strategy, and the converter will output a single, readable Python file (with types annotated and structure preserved) that can run bar-by-bar on their own OHLCV data using the PyneCore runtime.

To ensure accuracy, I tested the converter against a corpus of 1,909 real-world scripts. In my testing, 99.7% of scripts compiled successfully, and 98.4% were fully translated. The remaining scripts failed with clear diagnostics, which I prefer over providing subtly incorrect code or a backtest that cannot be trusted.

A key insight from this project is that a transpiler's correctness is only as good as the runtime it is built on. There were two classes of scripts that crashed due to bugs in the stock runtime, not because of issues in the translation. To mitigate this problem, I shipped a patched runtime build alongside the converter for free download on the site.

It is essential to explicitly state that the stock PyPI PyneCore is not supported. Rigorous testing of the translator and runtime as a pair on adversarial scripts should be done from the beginning of the project.

As for monetization, I kept it intentionally straightforward: a free account (sign-in by email code, no password or card required) includes three conversions, while the Pro plan costs $12/month for unlimited conversions, paid through Paddle. I opened the paid tier a few days ago, so the current honest revenue figure is: just launched.

It is crucial to understand that this converter is not a signal provider; it merely faithfully moves your code so that your backtests accurately reflect what you believe they mean. If you have ported trading code between languages or are developing dev tools solo, I would love to hear about your experiences and if you try Pine2Py, please share your results, particularly any issues you encounter. Your feedback is invaluable, as these reports will help me fix the last few percent of bugs.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in Tech

Toolbox talks shouldn't take your whole morning

I run a small safety software company, and I talk to a lot of small construction and trade crews. Almost every one of them tells me the same thing: the safety meeting itself isn't the hard part.

  • Toolbox talks should be limited to one topic and 10 minutes
  • Brief talks improve retention and attendance tracking
  • SMS reminders and immediate attendance recording streamline process

Checking hreflang on a bilingual static site with a 35-line Node script

My pension calculator has two language versions, English at / and Hindi at /hi/ , and most pages exist twice. I had always treated hreflang as a tag you paste once and forget.

  • Checker script verifies hreflang consistency for bilingual static site
  • Script ensures reciprocal links between English and Hindi versions
  • 76 pages with hreflang tags pass the script's tests

VITI Case Files: 4 Real-World Crises Where 403 Hard Halt Beats Governance Theater

In our previous look at the digital flight envelope, we broke down why enterprise systems need runtime boundaries instead of retrospective CAB meetings. Theory is clean. Reality is messy.

  • AI DevOps bot executed hard halt to prevent financial losses within 15-minute SLA
  • Automated substation load-balancing halted cascade of trips during winter grid failures
  • System halted unauthorized ingress in public identity services DDoS attack within milliseconds

More from Saturday 31 October →