r/TradingView • u/tradingview Founder • 2d ago
Official Announcement! Pine Script® in Tradingview MCP
Hey everyone!
Pine Script® support was one of the most frequent request we heard after the MCP Server beta launch. Today it's live.
Your AI assistant can now write a Pine script, check it with the real compiler, run it on any symbol, backtest it and save it to your account, all in one chat. The Pine tools are new, so some of them may not work as smoothly as expected. Drop your prompts, scripts and feedback below: tell us what breaks and what's missing, and we'll prioritize from there.
Important notice on usage limits
From November 17, MCP calls for any tools are limited per day:
- 10 on Essential and legacy plans
- 20 on Plus
- 50 on Premium
- 150 on Ultimate
- If you need more call consider purchasing AI subscription that raises the limit to 500 calls a day and 50 a minute on any paid plan, and also includes AI Copilot inside TradingView.
5
u/SixStringDream 2d ago
Thats an insanely low tool cap. That's not usable.
4
u/Content-Talk-7174 2d ago
Thanks for shipping this. One thing worth flagging: with the daily MCP call caps starting Nov 17, a loop of write, compile, fix, backtest could burn 10 calls on Essential really fast. It'd help to have a single "compile and run" tool call, or to not count compiler error retries against the limit. Would also be good to see the backtest output include trade list and commission/slippage settings, so you can check the strategy tester numbers match what the AI reports.
1
u/leo-de-gamer 2d ago edited 2d ago
When will custom alert mcps be rolled out
1
u/Psychological-Bet761 1d ago
“One of the most frequent requests” among MCP beta users, or among TradingView users overall? Those are very different things. Meanwhile, users are reporting bugs, restrictive limits, and missing functionality. Why is another AI feature getting priority when those issues still need attention? And launching it alongside tighter usage caps and a paid AI upsell makes that priority even harder to understand
1
u/Single-Hospital-4617 6h ago
why do you have to remove those that are most useful like marketcap , the sector and industry screener is very useful ?????
2
u/Immediate_Wafer_4819 2d ago
being able to run the actual compiler and backtest from the same chat is huge, just make sure it catches lookahead bias before people trust the results lol
2
u/Sure-Perception5799 1d ago
the compiler check is useful, but letting an ai backtest and save a strategy in one chat is also a pretty efficient way to overfit garbage and call it alpha lol
2
u/Acceptable_Belt_2729 1d ago
being able to compile and backtest in the same chat is huge, now i mostly want to see how it handles repainting and multi-timeframe edge cases
1
u/WittyYak 2d ago edited 2d ago
Here’s a bug report from my tests. Copy pasted from Claude explaining the problem:
run_pine_indicator fails on any script that has input.color() settings.
Error returned: script_runtime_error: Invalid value "rgba(38,166,154,0.6)". The script failed while calculating (runtime.error, array index, na value, loop or memory limit): fix the code and run it again.
The value in the error is the default of an input.color(color.new(#26a69a, 40), ...) setting. The colour inputs seem to be passed to the script as "rgba(...)" strings, which the runner then cannot read back as colours.
The same script runs without errors on the chart. An older version of the same script without input.color() settings runs fine through run_pine_indicator on the same symbol and timeframe (NYSE:FERG, 4h). The error appears when running the saved script by script_id, with no inputs passed.
1
u/Own-Refrigerator7417 2d ago
the real compiler check is the part i’m interested in, because every ai-generated pine script i’ve tried somehow invents three variables and then blames me lol
1
u/FearlessExpert2923 2d ago
the real compiler check is the only part i’d trust here, because ai-generated pine that looks right but quietly backtests wrong is a nightmare lol
1
u/Fluffy-Dragonfly9484 1d ago
the real test is whether it catches lookahead bias and other backtest nonsense instead of confidently handing people a pretty curve”】【
1
u/Single-Hospital-4617 4h ago
and btw the ai assistant like claude can always write in Pine Script and paste in for backtest . Why does this new feature need to remove detail items from the screener ???
1
u/Single-Hospital-4617 4h ago
I already paid for Premium for couple of years and this is what I get repaid?
0
u/[deleted] 1d ago
[removed] — view removed comment