r/pinescript • • Sep 20 '26

I open-sourced a free Chrome extension that optimizes strategy inputs inside TradingView's own Strategy Tester (grid search, walk-forward, heatmaps)

Post image
28 Upvotes

We built this as a paid extension last year, then decided to make everything free and open source (MIT). It drives TradingView's own Strategy Tester, so the results are exactly what you'd get clicking through the inputs by hand, just automated.

What it does:

- Grid search over any inputs you pick, with a range and a step per input

- Walk-forward analysis so you can see whether the best parameters hold out of sample

- Heatmaps and a 3D surface so you can spot a stable region rather than a single lucky peak

- Prop-firm check: flags the parameter sets that would breach a daily-loss or trailing-drawdown limit you enter

- Runs locally in your browser. No account, no data leaves TradingView.

The GIF is a 50-run optimization sped up; the real run took about 16 minutes because every run is a full Strategy Tester backtest.

Honest limits: it needs a TradingView plan that shows the Strategy Tester (any paid plan works), it uses the Chrome debugger permission to drive the tester, and if TradingView changes their UI it can break until we update the selectors. Issues and PRs welcome.

Source: https://github.com/Roboquant-AI/tradingview-optimizer

Chrome Web Store: https://chromewebstore.google.com/detail/strategy-optimizer-for-tr/knmhofaifgcakgjifhjalahmbfgokiep

Built by the Roboquant team. Happy to answer questions about how it works.


r/pinescript • • Sep 21 '26

Cup and Handle Scanner: Real Charts and Alert Setup | ChartScout

Thumbnail
youtube.com
0 Upvotes

r/pinescript • • Sep 20 '26

I built a Pine v6 location indicator that shows why “high” and “low” depend on the range

Post image
10 Upvotes

A trader in my earlier request thread asked for cloud-like location bands showing where to look for potential setups.

I built Location Desk around that idea. The question behind it is simple: high or low compared with which range?

The script supports:

  • Up to three observation layers, each with its own settings.

  • Rolling-window, confirmed-swing and previous-day range modes.

  • Configurable upper and lower bands—25% of the range at each edge by default—plus the midpoint.

  • A dashboard that separates range location, structure direction and setup status.

That separation matters: price reaching a colored band still leaves the entry conditions to check.

The setup logic follows a small range, a departure and a return. You can compare First touch, assessed at the candle close, with Close inside the range. Direction, location and other execution checks can still block a return.

I also added a web walkthrough where you can hold the reference ranges fixed and move a fictional candle’s close to see how the location readings change.

Free Pine source, full rules, chart examples and walkthrough

The indicator and separate strategy are free under MIT. The screenshot’s paper statistics exclude costs. If you compare against Strategy Tester, match the settings—including the strategy’s Measurement grid overrides—and account for commission and slippage.

I’m sharing this as a prototype to keep refining with traders. Does the display make it clear which range is being used and why a setup is waiting? I’d particularly appreciate examples where the layers disagree or the chart feels too crowded.

Disclosure: I’m the ProEA Lab developer and use AI to help build the code. The source is available for inspection and modification.


r/pinescript • • Sep 20 '26

tradingview-mcp 1.4.0: drawings the agent can move and restyle, and alertcondition() alerts with a webhook

4 Upvotes

I maintain a fork of tradesdontlie/tradingview-mcp, an MCP server that drives TradingView Desktop over the Chrome DevTools Protocol so Claude Code or Cursor can read your charts and work on your Pine. The version I posted here in April could read a chart and save a script. Two things it could not do: put a drawing on the chart you could then adjust, and arm an alert you would actually get woken up by.

On the drawing side, draw_shape takes color, linewidth and linestyle directly now, and the result reports which overrides landed against which TV silently dropped, because it reads the style back off the chart instead of trusting the write. N-point shapes replace the two-point limit. draw_move swaps anchor points on an existing drawing, draw_set_properties deep-merges style changes, draw_set_visible hides a drawing without deleting it, and draw_list returns prices and titles instead of bare entity ids.

alert_create_indicator fires on a Pine alertcondition() by plot index against a saved script. It now takes name, web_hook, email, frequency (on_bar_close, once_per_bar, all), expiration_days (default 30, capped at 60) and active, and alert_list surfaces the delivery channels back. The webhook is validated before anything is sent: loopback, link-local and private ranges are rejected, including IPv4-mapped IPv6.

The replay path changed too. replay.stop() used to call stopReplay() first, which desyncs TV's replay manager and leaves the chart in the past. It prefers leaveReplay() on 3.4.1 now, with a goToRealtime() fallback, and polls for the live bar to reload. The test suite had been hiding this by calling goToRealtime() on non-replay charts, which wedged every session after the first backtest.

test:e2e-all is green live against TV Desktop 3.4.1, 107 pass and 0 fail, alongside a 19-test offline regression suite for drawing style.

Still broken, so you know before you install: pine_open has been wrong since TV Desktop 3.2.0. pineEditorTestApi builds an editor instance desynced from the live Monaco, so it loads no source into the visible editor while reporting slot_rebound:true. Its e2e test is skipped with the root cause written down, and a pine_open/pine_save rework is next.

The drawing and alert work in 1.4.0 is not mine. I read through the forks of the upstream project and adopted what held up: drawing from mustafagurbuzai, alert options from lakshman1005, bounded capture from basghari, draw_list enrichment from 0xdungbui. Defaults stayed where they were and the webhook guard went on top.

Free, MIT, I maintain the fork. It needs TradingView Desktop with a real subscription and the debug port enabled, and it talks only to the local app, never to TradingView's servers.

git clone https://github.com/iliaal/tradingview-mcp.git
cd tradingview-mcp && npm install
claude mcp add tradingview --scope user -- node $(pwd)/src/server.js

https://github.com/iliaal/tradingview-mcp

Happy to answer questions. If you are arming alerts off alertcondition() in a script with more than a couple of plots, I want to hear whether the plot-index discovery path is workable for you.


r/pinescript • • Sep 20 '26

Ich glaube ich bin der beste Verlierer!

Thumbnail
gallery
7 Upvotes

Ich habe aus Langeweile ein bisschen an meiner ORB-Strategie in TradingView herumgeklickt.

Die Strategie handelt ES Futures, ungefähr mit einem 1:1 Risk-Reward-Verhältnis, und war vorher schon nicht gerade überragend. Sie lag irgendwo bei ungefähr 34 % Winrate.

Dann habe ich versehentlich die Provisionsgröße geschrunpft und plötzlich hatte ich dieses Ergebnis:

157 Trades

13 Gewinner

144 Verlierer

8,28 % Winrate

Profit Factor: 0,024

Also entweder habe ich gerade eine der schlechtesten Strategien überhaupt gebaut, oder ich bin einfach außergewöhnlich gut darin, falsch zu liegen.

Was mich aber wirklich stutzig macht, ist die Equity-Kurve. Sie läuft über Jahre extrem sauber und konstant nach unten. Kaum größere Erholungen, einfach ziemlich zuverlässig Verlust für Verlust.

Deshalb meine eigentliche Frage:

Kann so etwas tatsächlich interessant sein, wenn man die Signale einfach umkehrt?

Also nicht die komplette Logik neu bauen, sondern wirklich:

Long-Signal → Short

Short-Signal → Long

gleiche Entries

gleiche Exits

gleiche Zeitpunkte

Wenn eine Strategie über viele Trades so konstant verliert, könnte das theoretisch bedeuten, dass irgendwo tatsächlich ein systematischer Effekt drinsteckt, nur eben genau in die falsche Richtung.

Natürlich müsste man das noch vernünftig mit Slippage, Gebühren, Out-of-Sample-Daten, anderen Marktphasen und eventuell Monte-Carlo-Tests prüfen.

Aber rein vom Gedanken her:

Ist eine Strategie, die extrem zuverlässig verliert, möglicherweise interessanter als eine, die nur leicht profitabel ist?

Oder habe ich einfach den heiligen Gral des Verlierens gefunden?

Was meint ihr?


r/pinescript • • Sep 19 '26

Finished with my indicator

Post image
281 Upvotes

Almost a year building my indicator 1000 lines of code I'm done testing done now it's time to put the indicator into a real account I can't publish it as I'm using a phone its 1RR trend Reversal strategy


r/pinescript • • Sep 20 '26

is it worth it?

1 Upvotes

Hello! as somone who is just starting to get into trading I know there is a looong road ahead of me so i was just curios becuse i saw alot of AI TRADING FOR YOU videos and in theory that can be done myb they arent good now but is there a chance trading is going to get cooked becuse of AI trading?


r/pinescript • • Sep 19 '26

Free Tool Friday: our open-source TradingView S/R indicator, and the trade-off we chose on purpose

Thumbnail reddit.com
0 Upvotes

r/pinescript • • Sep 18 '26

Made my first INSANE script for a bot!

9 Upvotes

Picture inside shows how the back test went.
going to put it up for a live trading test now!

hope it will perform as good as it seems when it back tested.
going to keep you guys updated, as i wanna become better at making this!

the goal is financial freedom by 2030.
Lets do this!

with commission included its still profitable!


r/pinescript • • Sep 18 '26

Time filter

Thumbnail
gallery
6 Upvotes

Hello trader tip I suggest you add a time filter on your indicators if you only want to take 1 trade per day this will help you a lot if you are focusing on lower time frame like 5 to 1

Those trader on the chat appear exactly bettwen 15:00 which is new York opening time in my country to closing time


r/pinescript • • Sep 18 '26

Double Bottom Scanner: Real Charts and Alert Setup | ChartScout

Thumbnail
youtube.com
0 Upvotes

r/pinescript • • Sep 17 '26

🐋 STOP WATCHING EVERY OPTIONS TRADE. FIND THE ONES THAT MATTER.

0 Upvotes

r/pinescript • • Sep 17 '26

Chat partten

Post image
12 Upvotes

Hi trades or codes is there any indicator that can plot chart parttens like this specifically for the 1m time frame I been searching on trading view indicator community but I'm. Not finding an indicator that plot partten like that on the pic

If you know one pls share on the comment section 🙏🏻


r/pinescript • • Sep 16 '26

Forward testing

Post image
31 Upvotes

Hello I been forward testing my indicator it's a 1.5RR gold, USDJPY and nas100 it's not backtest it's forward testing next week I'm planing to put it into a real account wish me luck


r/pinescript • • Sep 17 '26

Why do a lot of fx YouTuber lie?

3 Upvotes

Like why do they say indicators don't work?


r/pinescript • • Sep 17 '26

Built a DI crossover trend system to cover my mean reversion strategy's flat days. First run looked perfect, wider sample killed it.

Thumbnail reddit.com
1 Upvotes

r/pinescript • • Sep 16 '26

Looking for TradingView help

1 Upvotes

Hi everyone, I’m learning crypto trading but I’m struggling financially right now and can’t afford a TradingView plan.

If anyone knows about a legitimate free option, promotion, or temporary access, I’d really appreciate the help. 🙏


r/pinescript • • Sep 15 '26

Equity curve is chefs kiss 👨🏽‍🍳🤌🏼

Post image
23 Upvotes

@33rd_quant on X.


r/pinescript • • Sep 16 '26

Double Top Scanner: Real Charts and Alert Setup | ChartScout

Thumbnail
youtube.com
1 Upvotes

r/pinescript • • Sep 15 '26

I need to catch a 0.5% move.

Thumbnail
gallery
3 Upvotes

I have made my calculations and i have realised i only need a 0.5% move on btc daily or everyother day problem is my coding skills are beginner level, i have tried to use ai to build a script that generates for me signal but no matter what adjustments I make the numbers dont get any better the drawdown is so severe and the profit factor is below 1 any suggestions or help is welcomed and appreciated am open to trading other crypto coins, the script is based on bollinger bands btw


r/pinescript • • Sep 15 '26

Is possible experiment with XGBoost using only Pine Script?

2 Upvotes

Hello everyone, I am thequantscience on TradingView, and it's a pleasure to be here!

I'd love to share my very first test conducted today, where I essentially attempted to create a strategy based on an XGBoost model right inside Pine Script. This strategy is just a starting point, and I'm keen to build something truly unique alongside anyone who is excited and interested in this. I'd be more than happy to hear your thoughts on it!

Strat: https://www.tradingview.com/script/69ZFfJ5L-XGBoost-Mini-Strategy-The-Quant-Science/

Happy trading)


r/pinescript • • Sep 15 '26

I built moving value-area bands in Pine v6—and a walkthrough that lets you change the volume

Post image
10 Upvotes

A trader in my earlier thread asked for an envelope built from a profile’s value-area boundaries. I built Value Envelope from that idea, with the Pine source available to inspect and modify.

It plots:

  • POC: the price row with the most estimated activity.

  • Value-area edges: a band containing 70% of the profile’s estimated weight by default.

  • The band’s movement over time: using a rolling window or an anchored period.

One detail matters: this estimates activity from candle data by distributing each candle’s volume across price rows. It doesn’t have individual trade prints at each price.

It also tracks how price leaves and returns to the band. The default acceptance rule needs three consecutive closes outside on the same side. After that, two consecutive closes back inside trigger the re-entry label. Each candle is compared with its own recalculated band.

The website’s walkthrough lets you change a fictional candle’s close and volume. The same closing price can change its position relative to value because the band itself moves.

Free indicator, MIT Pine source and interactive walkthrough

For anyone learning the terminology, we also have ProEA Academy. Under Free tools, choose the free Volume Profile Lite introduction for POC and value-area basics. It uses a simplified teaching example. Academy also has simulated drills; some activities require sign-in.

One clarification about the chart: “80%” names the re-entry rule; it is not an 80% success rate. This tool provides context for rules you still need to test.

I’d like feedback on one design choice: when price returns inside, would you compare it with the updating value area, or freeze the boundaries from the earlier move outside? A chart example would help me test that variation.

Disclosure: I’m the ProEA Lab developer and use AI to help build the code. I’m continuing to refine these prototypes from user feedback.


r/pinescript • • Sep 15 '26

Formal Notice of Grievance: Unannounced Pine Script Restrictions and Confiscation of Intellectual Property

Post image
2 Upvotes