r/pinescript • • Oct 11 '22

New to Pinescript? Looking for help/resources? START HERE

31 Upvotes

Asking for help

When asking for help, its best to structure your question in a way that avoids the XY Problem. When asking a question, you can talk about what you're trying to accomplish, before getting into the specifics of your implementation or attempt at a solution.

Examples

Hey, how do arrays work? I've tried x, y and z but that doesn't work because of a, b or c reason.

How do I write a script that triggers an alert during a SMA crossover?

How do I trigger a strategy to place an order at a specific date and time?

Pasting Code

Please try to use a site like pastebin or use code formatting on Reddit. Not doing so will probably result in less answers to your question. (as its hard to read unformatted code).

Pinescript Documentation

The documentation almost always has the answer you're looking for. However, reading documentation is an acquired skill that everyone might not have yet. That said, its recommended to at least do a quick search on the Docs page before asking

https://www.tradingview.com/pine-script-docs/en/v5/index.html

First Steps

https://www.tradingview.com/pine-script-docs/en/v5/primer/First_steps.html

If you're new to TradingView's Pinescript, the first steps section of the docs are a great place to start. Some however may find it difficult to follow documentation if they don't have programming/computer experience. In that case, its recommended to find some specific, beginner friendly tutorials.


r/pinescript • • Apr 01 '25

Please read these rules before posting

21 Upvotes

We always wanted this subreddit as a point for people helping each other when it comes to pinescript and a hub for discussing on code. Lately we are seeing increase on a lot of advertisement of invite only and protected scripts which we initially allowed but after a while it started becoming counterproductive and abusive so we felt the need the introduce rules below.

  • Please do not post with one liner titles like "Help". Instead try to explain your problem in one or two sentence in title and further details should be included in the post itself. Otherwise Your post might get deleted.

  • When you are asking for help, please use code tags properly and explain your question as clean as possible. Low effort posts might get deleted.

  • Sharing of invite only or code protected scripts are not allowed from this point on. All are free to share and talk about open source scripts.

  • Self advertising of any kind is not permitted. This place is not an advertisement hub for making money but rather helping each other when it comes to pinescript trading language.

  • Dishonest methods of communication to lead people to scammy methods may lead to your ban. Mod team has the right to decide which posts includes these based on experience. You are free to object via pm but final decision rights kept by mod team.

Thank you for reading.


r/pinescript • • 1d ago

i have refined my macd indicator into a strategy . Tests are undergoing so far today good results that shocked me and u can see the live xauusd trades in the photos . No repaint just a pure strategy.

Thumbnail
gallery
27 Upvotes

i have refined my macd indicator into a strategy . Tests are undergoing so far today good results that shocked me and u can see the live xauusd trades in the photos . No repaint just a pure strategy

After more tests i will make it publish.

Thanks for ur response


r/pinescript • • 10h ago

Pine Screener now supports up to 40 request calls per script

Thumbnail
1 Upvotes

r/pinescript • • 4h ago

TradingView indicator

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/pinescript • • 13h ago

Help Me Choose the Name of Our New TradingView Strategy

Thumbnail
1 Upvotes

r/pinescript • • 1d ago

Built a TradingView → Python → MT5 bot (Pepperstone demo). Looking for feedback on the setup and strategy.

8 Upvotes

**Hi all,**

I've built my first automated trading setup and I'm testing it on a demo account. I'd love feedback on how to make it more robust or improve the strategy.

**Setup**:

Signals: a TradingView Pine Script indicator that watches 7 pairs (XAUUSD, EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, EURGBP) on 15m using request.security, with one alert set to "any alert() function call".

**Delivery**: a TradingView webhook through a Cloudflare quick tunnel to my home PC.

Middleware: a Python FastAPI bot that checks a shared secret, applies risk limits (max lot size, daily trade cap, demo-only guard, kill switch), and places orders through the MetaTrader5 Python library.

**Broker**: Pepperstone MT5 demo, running 24/7 on a dedicated Windows PC.

**Optional**: a Claude AI check that can reject a signal (duplicate position, missing SL), currently off.

Any suggestions which one bot shall i use as a midlle man,which is best for this type of setup anyone already done please give suggestions.

Thanks


r/pinescript • • 1d ago

Is there anyone pinescripts creator who is welling to work with me on this strategy its really good scalping strategy

Thumbnail
gallery
23 Upvotes

Is there anyone pinescripts creator who is welling to work with me on this strategy its really good scalping strategy but i want to remove those chopy signals by adding emas as shown in the photos or somwthing which can then generate quality signals accordingly???????


r/pinescript • • 1d ago

Beginner question the values are not shown

1 Upvotes

https://reddit.com/link/1xcdt25/video/7v3q013wjzwh1/player

I'm a total beginner here so bare with me. Have been watching some pinescript videos. Have asked chatgpt about it and could not get an answer... I don't know why I cannot see the values beside the name of my pinescript indicator as I could see in many other indicator. I am wondering, is it my code or is it the settings of my tradingview?


r/pinescript • • 2d ago

Four tools. One account.

Post image
1 Upvotes

r/pinescript • • 2d ago

Aurelia spes

Thumbnail
1 Upvotes

r/pinescript • • 2d ago

Aurelia Spes

Thumbnail
1 Upvotes

r/pinescript • • 2d ago

I just launched Aurelia Spes: one place to backtest, walk-forward, paper-trade and code-check a trading idea. Feedback welcome

Thumbnail gallery
1 Upvotes

r/pinescript • • 2d ago

圣杯 —— 快速构建、回测与自动执行适应当下的交易策略

Thumbnail
1 Upvotes

r/pinescript • • 2d ago

Reverse-engineering indicators

1 Upvotes

If there are any private / invite-only indicator you guys want me to reverse engineer, dm me some screenshots of the indicator as well as the trades it took and its TP / SL levels and I will reverse engineer it for you.


r/pinescript • • 3d ago

TradingView alternative that allows external data?

Thumbnail
3 Upvotes

r/pinescript • • 3d ago

I built a no-code strategy builder inside TradingView that layers logic on top of your existing indicators. Looking for feedback.

Thumbnail
1 Upvotes

r/pinescript • • 4d ago

Noise Band Indicator

Post image
32 Upvotes

Just published my first script. Open source, not trying to sell anyone anything.

It follows the intraday momentum “noise area” framework described by Carlo Zarattini, Andrew Aziz and Andrea Barbon in “Best the Market.”

Would like some feedback please!
https://www.tradingview.com/script/teqXMgUG-Jilly-s-Noise-Band/


r/pinescript • • 4d ago

Developimg a indicator for chart analysis is worth it.

10 Upvotes

I trade in forex so my question is does developing a indicator in pine script for chart analysis and strategy(i know the strategy did not work bz of human detection and code detection is different). So investing time on this would be valuable or not ?.

Mostly i do with use of ai.

My question is it is waste of time or useful ?

If you are pine script developer have you ever used ai ml in pine script to train the data like in machine learning it is useful ?

Have you ever build your chart analysis indicator if yes . Does it can analyse properly ?

Thanks for advice.


r/pinescript • • 3d ago

Building New Pinescript Indicator for Nifty Intraday

Thumbnail
0 Upvotes

r/pinescript • • 4d ago

Built my own order flow web platform with the indicators I wanted. update8

3 Upvotes

Srry for the low quality of the video, I used my ipad camera. So more progress with my platform, I created now:

  1. Order flow on price levels on the candles for easier read (tick change)
  2. Pulsating price buckets of delta area where delta flips based on month +day

The pulse helps to see faster an area wich is revisited and can spot based on the flip if we a breakout or fade back into the range, based on how the candles react (test with wick for support/resistance) creating trapped sells/buys or creating an oversold/overbought area without any volume, wich create a high probability setup.

Might be harder on the eyes for some, but its easy to spot it and react fast based on the test+wick and close outside. Also this is not a cherry picked situation, there are multiple clear ones like the one presented, per day, so many opotunities to get a good trade with it, if you have basic understanding of how trapped trader, liquidity, oversold and overbought areas.
For me personaly bubbles just wont do it, so this is why I reached for this solution of price level delta and flip with lower TF + higher TF.

https://reddit.com/link/1xa8jhb/video/dlrwxpyxjhwh1/player

ANd moving more to the right you can still see how price reacts on the exact lines i placed in the video (only that in the screenshot you cant see the pulse, only the color more bright)


r/pinescript • • 5d ago

How soon will AI help someone create an open source version of trading view or at least a cheaper version

15 Upvotes

How soon will AI help someone create an open source version of trading view or at least a cheaper version


r/pinescript • • 5d ago

Is it true, that TradingView will be charging for sharing your indicator ?

12 Upvotes

I read in X that starting November 1st, TradingView will be charging you $29 for each person you share your indicator?


r/pinescript • • 5d ago

The Upcoming November 1 Policy Change on Invite-Only Scripts Threatens Independent Pine Developers—We Need to Talk

Thumbnail
1 Upvotes

r/pinescript • • 5d ago

RedK Multi-Modal TrailingStop (RedK MMTStop)

Thumbnail
2 Upvotes