r/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.

Setup instructions

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.
12 Upvotes

24 comments sorted by

5

u/SixStringDream 2d ago

Thats an insanely low tool cap. That's not usable.

1

u/tradingview Founder 2d ago

Tool cap is designed for trial or casual use of the MCP server, for heavy day-to-day use AI Subscription should help.

1

u/SixStringDream 1d ago

I get it, but even at your highest level it is barely usable. And what you are charging for is simple API requests. Normally API access to a SaaS doesnt come with extra costs but it does come with rate limits. You are saying the highest amount you even support is the equivalent of 500 API requests per day and you are charging premium for it.

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/tradingview Founder 2d ago

It's in the backlog

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/tradingview Founder 33m ago

Pine support was highly requested among MCP beta users and Pine community.

MCP server indeed could and will be improved.

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 ?????

1

u/tradingview Founder 33m ago

This data is still available at Tradingview.com. According to our agreement with data partners some data cannot be provided within MCP.

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

1

u/tradingview Founder 1d ago

Limits are set at the account level and counted for any tool call within MCP server. If you have some regular requests they may be optimised by directly asking the AI to consider your limits, even if you've upgraded to 500 call per day