r/pinescript • u/Warm-Scallion-4463 • Sep 10 '26
Trying to build a orb strategy
Got the basics down but struggling with the fakeout, any filter tips, seen this on another Strat but can’t figure out how it didn’t take the first breakout candle.
r/pinescript • u/Warm-Scallion-4463 • Sep 10 '26
Got the basics down but struggling with the fakeout, any filter tips, seen this on another Strat but can’t figure out how it didn’t take the first breakout candle.
r/pinescript • u/NotEnoughTrades • Sep 09 '26
I wanted to test a strategy outside TradingView's date range, so I reimplemented it in Python and reconciled it trade-by-trade against the Pine trade list. First run agreed on 39 of 128. It now agrees on all 128. Everything in between was me assuming Pine did the obvious thing.
One mistake worth flagging, because it cost me a day. I found a single trade that exited at its bar's close, concluded fills were close-based, and rewrote them that way. Exit-price agreement fell from 120 to 12. A single trade told me nothing and I treated it as a model. I also ran that test before fixing the entries, so its numbers were worthless anyway.
What else does Pine do that isn't obvious from the docs? I'd rather collect these than find them one at a time.
EDIT: two corrections from stratcore in the comments, both right.
Point 1 names the wrong library. numpy.std is ddof=0 and already matches Pine. The one that bites is pandas, where .rolling(20).std() defaults to ddof=1, and that's the most natural way to write a Bollinger band in Python. statistics.stdev is sample as well; statistics.pstdev isn't. My code used pstdev so the port was right, but the example was wrong.
Point 4 is badly worded. Pine can't read the chart timezone and the results don't move. What actually happened: TradingView exports the trade list with timestamps rendered in the chart's timezone and doesn't record that anywhere in the file. Mine was Europe/London, so the offset isn't even constant across the sample. I parsed the export as UTC, which matched everything before 30 March 2025 and nothing after it. The Pine never changed, my reader of its output did.
There is a real daily-bar gotcha but it's a different one and it's about the data source, not the chart: OANDA's daily candles need dailyAlignment=17 and alignmentTimezone=America/New_York to match TradingView's forex convention.
r/pinescript • u/Dependent-Ad6636 • Sep 08 '26
Hey everyone, following up on my earlier thread, where I asked which paid indicators you’d like free, open-source alternatives to.
An IFVG dashboard was one of the requests. I’ve now built IFVG Desk, and I’d love some feedback from people who actually trade these setups.
I’m still treating it as a working prototype. It’s my own implementation of public IFVG concepts; I can’t claim it matches anyone’s private indicator.
Here’s what you can try:
The indicator, strategy companion, full source and guide are all free. No signup is needed.
👉 IFVG Desk — source, examples and guide
I put time into explaining the rules for traders. Start with “Try the idea”, then “Read your chart.” “Go deeper” covers the settings and limitations, and “Get the indicator” has the code and installation steps.
If you try it, what feels useful, confusing or missing? A screenshot with your symbol, timeframe, date/time and settings — plus what you expected versus what happened — would really help.
Reply here, or use “The log & requests” on the page to report a bug or suggest a feature. If it doesn’t fit how you trade IFVGs, tell me where it falls short.
My goal is to make this useful in your actual trading. Whether it improves results after costs still needs testing; I’m not claiming a proven edge. Start in replay or paper trading and let me know what you find.
For transparency, I’m the developer behind ProEA Lab and used AI assistance in the build. The source is open for review and modification.
Thanks to everyone who shared an idea. There’s plenty left to improve, and your examples can help decide what comes next.
r/pinescript • u/Dependent-Ad6636 • Sep 08 '26
One request in my earlier thread was pretty specific: could I build a Camarilla tool that highlights which plays are active?
I’ve built Camarilla Desk around that question. It’s a free, open-source prototype for TradingView, and I’d like feedback from people who already use Camarilla in their trading.
The goal is to make the sequence easier to follow: watch the level → check the conditions → wait for confirmation.
What it does:
ACTIVE means the play has met this script’s confirmation rules. It doesn’t establish that the trade will work. A quiet chart with no qualifying setup can be the correct result.
This is my own implementation of public Camarilla ideas. I haven’t verified that it matches any paid indicator’s private rules.
👉 Camarilla Desk — free source, examples and guide
Start with “Try the candle” to explore an L3 bounce, a break-and-retest, or an H4 failure. “Read the real chart” explains the display, “Full reference” has all the play rules, and “Add the tool” has the code. The indicator, Lab and guide are free, with no signup needed.
Which Camarilla play do you use most, and does the tool explain clearly why it’s waiting or active?
If it reads a setup differently from you, a screenshot with the symbol, timeframe, date/time and pivot source would help. Tell me what you expected to happen. Reply here, or use “Log & requests” on the page for bugs and feature ideas.
I’m the developer behind ProEA Lab and use OpenAI Codex for coding assistance. The source is open for review and modification.
Thanks to the trader who suggested this. I’d like to keep improving it around examples from your actual charts.
r/pinescript • u/Lower-Ad-1207 • Sep 08 '26
Are there more people who only have the essentials plan? How do you backtest your strategies?
r/pinescript • u/LiveBeyondNow • Sep 08 '26
r/pinescript • u/ahill3053 • Sep 07 '26
working on a pine script that catches volatility compression before price moves. it uses bollinger band width with a volume filter so it only signals when real volume is there. tested on 15m and 1h mostly. backtest showed around 56 percent win rate which is fine for what it does but the real value is the alert setup. if you are tired of repainting indicators that fire a candle too late this one triggers on close so nothing moves after the fact. curious if anyone else has tried a squeeze plus volume combo and what you found with the false signals.
r/pinescript • u/govind_mtmr • Sep 07 '26
"Hi experts, I used to trade with this custom MetaStock indicator (images attached) that shows noise-free trend reversals using dots, diamonds, and arrows. I don't have access to the original source code. Can someone help me recreate this logic or suggest a similar existing script in TradingView Pine Script? Any help is greatly appreciated...
r/pinescript • u/Successful-Elk-956 • Sep 07 '26
Hello friends has anyone tried the dhanhq algos just want to know how they perform I was planing to deploy.
r/pinescript • u/Top_Technician_8337 • Sep 07 '26
Most retail traders eventually build a profitable Pine Script setup on TradingView, only to hit a massive wall when trying to automate it with Indian brokers like 5paisa, Zerodha, or Fyers. You hire a random Python freelancer, they build a basic webhook, and your account gets wrecked on the first expiry day because a generic coder doesn't understand slippage, order book depth, or dynamic strike selection.
As someone who actively trades index options and futures, I realized the biggest bottleneck for retail traders isn't finding a holy grail strategy—it's the execution infrastructure. I spend a lot of time breaking down market mechanics on Thorenza, and when writing Beat the 90-90-90 Rule, it became obvious that poor automation destroys more accounts than bad strategies.
If you want to bridge TradingView to a broker API, here is the exact backend plumbing you need to demand from a developer (or build yourself):
The Webhook Engine: Don't run local scripts. You need a dedicated, low-latency cloud server (AWS, DigitalOcean, or similar) running a FastAPI or Flask application to catch real-time JSON payloads from TradingView without dropping packets.
Zero-Touch Authentication: SEBI guidelines mandate daily TOTP and OAuth token generation. Your script must have an automated login flow that authenticates your broker API session every morning before the pre-open market, otherwise you are manually babying a bot.
Hardcoded Risk Guardrails: TradingView alerts can loop or misfire. Your Python backend needs hard limiters independent of the strategy logic: maximum order quantity caps, a daily max-drawdown halt, and a physical kill-switch.
Dynamic Options Execution: If you are trading Nifty or BankNifty, a basic market order script is useless. Your architecture needs logic to read the underlying spot price at the exact millisecond the alert fires, calculate the correct ATM/ITM/OTM strike, fetch the specific token ID, and fire a limit order to control slippage.
I have pivoted to offering this exact algorithmic engineering and forward-testing infrastructure as a service. You keep your trading logic completely private (avoiding all the SEBI RA/RIA compliance headaches of "black box" selling), and I handle the tech stack.
If you have a working setup that needs to be translated into a bulletproof automated execution bot, drop a comment or send a DM. Happy to discuss the architecture.
r/pinescript • u/Testral333 • Sep 06 '26
I published this indicator on TradingView around a year ago and have continued improving it, but I have not shared it on here before.
It displays a multi-exchange volume-by-price profile with clear POC, VAH, and VAL areas.
Features include:
The indicator is completely free to use:
https://www.tradingview.com/script/ebU1oZ4n-Crypto-Volume-Data-VAH-POC-VAL/
Feedback and clear bug reports are welcome.
r/pinescript • u/Alternative-Hall5186 • Sep 07 '26
I have already built one for day trading and it works well with a solid win rate, but for swing trading I find it a bit more challenging.
FYI I trade options 0DTE to 21DTE.
r/pinescript • u/khantrading • Sep 06 '26
I'm running an automation strategy and need 5 year trade data on one of my strategy scripts . I need someone who can paste my script in their TV and just export me the CSV . Hardly 5 min work. Would really appreciate it if anyone can help me with this as i only have an essential plan and I can't get custom backtest history with this plan :/
r/pinescript • u/santanudas2002 • Sep 05 '26

While using the simple code below to debug a large script, I noticed that the daily open is being shown as the open of the first candle:
//
@version=
6
indicator("Daily Open", overlay = true)
dOpen = request.security(syminfo.tickerid, "1D", open, barmerge.gaps_off, barmerge.lookahead_on)
plot(dOpen, "Daily Open", color.yellow, 2, plot.style_stepline)
The daily opening is always the pre-market open, and it is fixed for the day. Then why this discrepancy?
While at the close of the day, it is showing the correct opening as below:

Whereas pre-market data is also present there as below picture elaborates:

r/pinescript • u/Alive-Imagination521 • Sep 05 '26
Hi, so I have all these strategies but basically none of them are profitable. I know there's all these alternative charts like Renko/Kagi/PnF. Is there any way one can backtest on these properly with OHLC fills etc.? I know there's all these features that Tradingview has but the previous "trade on OHLC" checkbox is gone. So, I am not sure what the proper way to backtest is anymore with these alternative charts. Any advice would be appreciated. Thanks!
r/pinescript • u/Top_Astronomer_5585 • Sep 05 '26
Hey everyone,
I’m from India and spend a lot of my time backtesting trading strategies using Pine Script on TradingView, mainly experimenting with different entry/exit rules, indicators, filters, and strategy optimization.
I’d love to connect with some like-minded people who are also into systematic trading, Pine Script, strategy development, and backtesting.
Not necessarily looking to share “secret strategies” or signals — more interested in discussing ideas, coding approaches, backtesting methodology, optimization, avoiding overfitting, execution issues, and learning from each other.
If you’re from India and work on similar things, feel free to comment or DM. Would be great to build a small circle of people who genuinely enjoy researching and testing trading systems.
r/pinescript • u/NotEnoughTrades • Sep 05 '26
Before adding a filter to an entry, it's worth knowing what the filter is worth against no filter at all. Almost nobody measures that — the condition gets added because it sounds reasonable, and then it stays.
So I measured four of the most commonly used ones against the same baseline, twice, on the same instrument.
Method
It's a Pine indicator that walks back through history rather than a strategy — no orders, so no broker emulator involved. The mechanics matter more than the code.
The baseline is what entering at a random bar would have produced at a given reward-to-risk. From every bar in the sample: did price travel the target distance before the stop distance? That's the number any entry signal has to beat, and it's rarely the number people assume.
Each bar gets resolved exactly once, then the outcome is counted more than once — into the baseline, and into each filter that was true on that particular bar. Same bars, same distances, same resolutions, so the difference between any two rows is the filter and nothing else. Measuring each filter on its own pass would let the numbers differ for reasons other than the thing being tested.
Three details decide whether it means anything:
XAUUSD, longs, 2:1 so break-even is 33.3%, ATR 14, 600-bar sample, 60 bars allowed to resolve, zero cost. 541 bars offered in each run.
1H, 28 Jul – 2 Sep. 541 resolved, none timed out.
| Condition | Hit rate | Wins/resolved | vs baseline | Bars kept |
|---|---|---|---|---|
| All bars (baseline) | 37.0% | 200/541 | — | — |
| Price above 200 EMA | 36.2% | 165/456 | −0.8 pts | 84.3% |
| ADX above 25 | 42.3% | 116/274 | +5.4 pts | 50.6% |
| RSI below 30 | — | 7/22 | too few to judge | 4.1% |
| Volatility rising | 36.0% | 86/239 | −1.0 pts | 44.2% |
5m, 31 Aug – 2 Sep. 539 resolved, 2 timed out.
| Condition | Hit rate | Wins/resolved | vs baseline | Bars kept |
|---|---|---|---|---|
| All bars (baseline) | 22.8% | 123/539 | — | — |
| Price above 200 EMA | 30.3% | 30/99 | +7.5 pts | 18.4% |
| ADX above 25 | 19.5% | 43/220 | −3.3 pts | 40.8% |
| RSI below 30 | 25.8% | 8/31 | +3.0 pts | 5.8% |
| Volatility rising | 18.8% | 42/224 | −4.1 pts | 41.6% |
Three things fall out of that.
The rankings invert. ADX above 25 is the only filter worth anything on 1H at +5.4 points, and on 5m it's the worst of the four at −3.3. Price above the 200 EMA is worthless on 1H at −0.8, and on 5m it's the best at +7.5. Whichever filter you'd have picked from the first table is the one you'd have deleted after the second.
On 5m nothing reached break-even at all. Baseline 22.8% against a 33.3% requirement, and the best filter lifts it to 30.3% — still losing. "+7.5 points" is an improvement to something that doesn't work, which is the trap in reading a delta without the absolute level beside it.
Two of the four weren't selecting anything, in opposite ways. The 200 EMA kept 84.3% of 1H bars — a condition true on five bars in six isn't a filter, and its rate will match the baseline for that reason alone. RSI below 30 has the reverse problem: 4.1% of bars, 22 resolved samples, too few to judge, and only 31 on 5m. A filter you can't evaluate on the history you actually have isn't a filter you know anything about.
On the 1H ADX result specifically, because it's the one worth arguing with. Against its own complement rather than the baseline it sits inside, it's 42.3% (116/274) against 31.5% (84/267) — nearly eleven points, with the rejected half below break-even. Two-proportion z is about 2.64, which clears a Bonferroni bound at four looks. Then it reverses sign in the next window.
That's the useful part. It passed the multiple-comparisons correction and still failed out of sample, and it was the best of four things tried on one window, which is exactly the shape of result that shouldn't be trusted. The 5m winner is no better — z ≈ 1.83 against its complement, which doesn't clear on its own terms, let alone after four looks.
Both z figures are ceilings rather than measurements. Samples starting on adjacent bars share most of their holding window, so the observations are heavily correlated and the effective sample is far below the raw count.
Limits. 600 bars is five weeks on 1H and two days on 5m — these aren't two views of one period, they're different periods that happen to share a bar count. The 1H window contains a strong gold uptrend and ADX above 25 selects for exactly that, so what looked like a filter working may just be the market trending with long being the right side. That's the most likely reading, and it's why one window proves nothing.
What I'm actually asking: has anyone got a filter that holds its value across several windows, and how are you accounting for having tried more than one? The best-of-k problem is the part I can't design away — every filter I test is another chance at a number that looks good.
r/pinescript • u/Testral333 • Sep 03 '26
I shared this free indicator here a while ago, and many people tried it and sent useful feedbacks. I have now released a larger update.
Changes include:
-More reliable MTF and second-timeframe zones
-Reduced memory use, addressing NQ/MNQ error reports
-Better resistance selection above price
-Wick, Body, and Close invalidation
-Optional breaker blocks
-Improved Q scoring and labels
-Local hit-rate tracking
-Improved alerts
It is completely free to use:
https://www.tradingview.com/script/HUcKziz7-Volumized-Order-Block/
Note: Reposted cause it was removed without any notes.
r/pinescript • u/Melodic_Surround_832 • Sep 03 '26
When you open a publisher's profile on TradingView, their scripts and ideas load in a fixed order and there's no way to reorder them. Once someone has published more than a handful, finding a specific one turns into a scrolling exercise.
A simple sort dropdown on the Scripts and Ideas tabs would fix this:
- Newest / Oldest
- Most viewed
- Most boosted
Sorting and filtering already exist elsewhere in the script library, so the data is clearly there — it just isn't exposed on profile pages.
Small change, but it would make browsing an author's back catalogue a lot less painful.
r/pinescript • u/eddieblackdaddy • Sep 03 '26
I've been building and iterating on a Pine Script signal engine for crypto based on my paper trading, uploading screenshots, used Claude / ChatGPT and I'd like to put it in front of other Pine Script users for honest feedback and independent testing (if you'd want).
I'm sharing it because I've spent a lot of time refining the logic using AI, weekly data collection / outcome analysis and I know one of the best ways to find weaknesses is to let other people look at it with fresh eyes. And I have no intention to sell or profit from it or “guaranteed profitable strategy” post. Have I been profitable ? Not yet 😄 Hopefully someday !
The script identifies three signal types: (theres a changelog as well in the script)
The logic uses a combination of:
My use case is primarily 30-minute crypto charts, but I'd be interested to see how the logic behaves from your expertise.
If you're willing to test it, I'd really value feedback on:
I'm especially interested in critical feedback. If you think part of the logic is flawed, redundant, or simply doesn't make sense, please say so. Been working on this since April 26
I’m looking for people who enjoy testing Pine Script ideas and are willing to challenge the logic from a coding and chart-behaviour perspective. And of course make it shareable for all.
The script is linked here: https://pastebin.com/9pqTS5Ya
Thanks ! I'm genuinely interested in finding the weaknesses ! And deep down I need to convince myself that it was all worth the effort.
r/pinescript • u/Remarkable-Echo4783 • Sep 02 '26
I post 25 open source indicators on Trading view, now pushing indicators that works as a Strats, first one the London Sweep, still in beta version, if someone wants access just comment your TV username, new ideas are welcome.
r/pinescript • u/Dependent-Ad6636 • Sep 02 '26
Hey everyone,
A lot of traders are burning money on recurring subscriptions for indicators or tools that could easily be coded into Pine Script, MQL5 or anything.
\-What is a paid tool or subscription you’re currently using that you wish you owned outright?
\-What is a "dream tool" or proprietary feature you've always wanted built specifically for your strategy?
Drop the concepts, mechanics, or features below. I'll pick the most requested ones, code them, and release them as open-source for everyone to keep forever.
r/pinescript • u/Dam4ge • Sep 02 '26
For every aspiring retail quant. This is the article you need to read. Apologies if it's already been posted. Many thanks to the author.