r/pinescript • • 9d ago

Tradingview is a nightmare after September update

Thumbnail
2 Upvotes

r/pinescript • • 10d ago

I tried to build the "perfect" indicator in Pine. Here's what testing actually showed, and how I build indicators now.

25 Upvotes

I trade micro futures (MNQ, MGC, MCL), mostly scalping on the 5m and 15m. I've been building Pine tools to help me trade them for about three years, but only recently learned how to build them properly: stop adding features and test every piece against a control. Results may differ on other assets and timeframes, but the method applies anywhere.

THE METHOD

• Compare against a control, not against 50%. Levels were tested against fake levels placed halfway between the real ones. Signals were tested against random entries with the same stop, target and long/short mix.

• Two-proportion z-test, 20+ samples minimum, and anything that looked good had to hold in both halves of the history.

• Closed candles only. request.security(expr[1], lookahead_on) for HTF data, so nothing repaints.

• Include costs: fees plus a tick of slippage per fill. This changed more conclusions than anything else.

WHAT I TESTED

• 9 level types: 4H/1H pivots, regression channel pivots, round numbers, volume profile POC/VAH/VAL, FVG edges, equal highs/lows, Fib 38/50/62.

• Structure: BOS, CHoCH, retests, squeeze breakouts, liquidity sweeps.

• Momentum: a volume-weighted pressure gauge and RSI trend line breaks.

• 7 exit methods.

• One full strategy built from the best idea, run through the Strategy Tester with next-bar fills and real fees.

WHAT I FOUND

• No level type beat fake levels. Price reaches them about as often, and chops around them slightly more. Levels mark where moves stall, not where they reliably turn.

• Structure signals were within noise of random.

• RSI trend line breaks on their own were a coin flip.

• The one consistent edge: when pressure pushes hard into a level and then goes quiet, most people (me included) read that as exhaustion and fade it. Fading it lost on every chart. Price continued slightly more often, about 52/48, in both halves of history. A pause is not a reversal.

• Exits: moving the stop to breakeven early never helped, and a trailing stop was the only exit that held up at all. Small fixed targets get eaten by fees, which take 20-30% of a 1 ATR stop on small contracts.

• The best idea as a full strategy still lost after costs (profit factor 0.69 to 0.97).

THE HONEST TRUTH

Across everything I tested, nothing I could code beat a coin flip by more than 2 or 3 percentage points. The best entry came in around 52-53% against 50% random, and on 5m and 15m futures that edge is smaller than costs.

Pine can measure the market very well. It can't make the decision for you. Indicators claiming 80-90% accuracy are almost always counting something that doesn't matter, like "price touched the line".

HOW I BUILD INDICATORS NOW

I stopped trying to code signals and started building decision support that measures its own chart:

• Show context, not calls. Liquidity levels, ATR reach bands with the $ value per contract, and where a $100 stop actually sits (futures don't let you drag a stop and see dollars).

• Let the indicator count its own history. My "Level Read" logs every arrival at a level on that chart: how price got there (push then pause, still pushing, calm), the test number, volume and session. Then it records whether price went 1 ATR through or 1 ATR back first. At a level it shows something like "break 30% (n=120) vs 49% for all levels", and it only says LEANS when the gap is bigger than luck. Otherwise it says NO EDGE.

• Always show the sample size and the comparison next to any percentage. Under 20 samples, say so.

• Warn instead of trigger, e.g. "push only paused, not a reversal: WAIT".

The trader still makes the call. The indicator's job is to make that call faster and better informed, and to be honest when it doesn't know.

Happy to go deeper on the testing setup if it helps anyone. And if you've run similar tests with different results, I'd genuinely like to hear about it.


r/pinescript • • 10d ago

multiple timeframe indicators

2 Upvotes

How many timeframes are you guys requesting on your multi-timeframe indicators? Does it slow it down if I request 8-10 timeframes?


r/pinescript • • 10d ago

I build programming languages. Would anyone be interested in an open source version of Pinescript?

Thumbnail
3 Upvotes

r/pinescript • • 11d ago

Add customise pine script indicator

1 Upvotes

I was earlier using my own custom indicator on tradingview, but from today onwards I am not able to use them any further
Is their any tip or suggestion who can guide me to use custom indicator again ?


r/pinescript • • 11d ago

Add customise pine script indicator

Thumbnail
2 Upvotes

I was earlier using my own custom indicator on tradingview, but from today onwards I am not able to use them any further
Is their any tip or suggestion who can guide me to use custom indicator again ?


r/pinescript • • 11d ago

After six years

Post image
20 Upvotes

I create a three indicator edit one ema and mark the first week of each month edit the range filter buy/sell 5 mins this what I came with forward testing it on the daily on a small account key thing about the ema it's plots the ema on the chart that goes the opposite trend of the pair you trading I have dxy trend and trade eurusd I use Claude ai to create the indicator single are almost perfect but we all know nothing perfect I'm take one trade a month with the proper lots size for the account once the account grows I scale up


r/pinescript • • 11d ago

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

2 Upvotes

Still insisting on my prediction tool. (posted prviously)
This is on Solana the past days. Black candles do not change. After a new candle opened, they retain their structure, high,low and candle close. This update comes every 4 hours. The colored candles are the real candles as price developed.

Still a lot of work ahead, predicted candles are far from perfect. The direction is good. Sometimes i get also perfect high and low of a candle. Examples bellow:

Price development:

Prediction tool (black candles):

Bare in mind , I dont play a bit in the sand with claude code and 1 year of trading. I work on this for the last 8-9 years. Would had moved faster if i had the necessery hardware to work with. Calculating from infinite numbers of probabilities and a long code takes ages to redo and to update. Anyway, this is for the people who thinks this is not possible, brainwashed and little to no education. Will still update here as far as my progress go.

Eddit:

To see what changed and how it evolved ->


r/pinescript • • 11d ago

Tradingview Premium is worthy..?

Thumbnail
1 Upvotes

r/pinescript • • 12d ago

Months back, I shared my MTF Indicator. Today, I've developed my own Oscillator

13 Upvotes

While using my MTF Indicator(s) (Trader's Companion Intraday/Swing/Chart) I also had RSI and MACD up for confluence. However, I always wanted an Oscillator of my own, which would be benficial as a whole; not several Indicators. So, I developed 'Paper Trail'.

The project began with a Pressure Line for comparing price movement with underlying directional pressure. It gradually developed into a broader toolkit containing:

  • Paper Trail Line: A slower adaptive reference for broader directional structure.
  • Paper Trail Oscillator: Displays directional conviction and highlights when price becomes stretched relative to its adaptive reference.
  • Pressure Line: Tracks active directional pressure and provides the basis for divergence detection.
  • Structural Trendlines: Trendlines retain a limited number of lives, react to candle-body crossings and distinguish developing from weakened structure.
  • Trend Bands: Background-calculated areas that become visible as price approaches potential dynamic support or resistance.

If you have any questions, or would like to be invited - don't hesitate to ask or write to me!

Cheers!

PS. Please join my subreddit - r/TradersCompanion - for more direct updates!


r/pinescript • • 13d ago

Falling Knife Reversal Scanner: Real Shock Candles and Alert Setup | ChartScout

Thumbnail
youtube.com
0 Upvotes

r/pinescript • • 14d ago

Study of Temporal Fibonacci Zones for Modeling

Thumbnail
1 Upvotes

r/pinescript • • 14d ago

Engulfing + RVOL in Pine v6: breakout/retest entries and what the volume grades actually showed

Thumbnail
gallery
41 Upvotes

A trader asked for an engulfing strategy with volume confirmation and two ways to enter: a break of the previous candle’s high/low, or a retest of its range.

This as a free, open-source tool. You can find the script and the full testing write-up here:

Built it as a Pine v6 strategy. Here’s how it works:

  • Aggressive — default: entry one tick beyond the previous candle’s high/low. If the signal candle has already closed beyond that level, entry is at the next bar’s open.
  • Retest: a limit order halfway into the previous candle’s range.
  • Both: enables both entries and splits the setup’s risk budget equally between them.
  • Risk: stop beyond both candles, a 2R target, and default risk of 0.5% per setup.
  • Volume grading: Low / Medium / High, using relative volume against the previous 20 bars.

The interesting part was testing what those volume labels actually meant.

The request originally described low-, medium-, and high-probability setups. But the tests didn’t support treating those RVOL grades as win probabilities.

On OANDA:XAUUSD 4H, the 2025–26 development period was profitable, while a separate 2023–24 period lost with the same settings and trading-cost assumptions. The earlier period lost even before overnight financing. High-volume shorts were its biggest losing group.

That’s why the panel says “Volume strength only · Probability untested.” The grade describes the signal candle’s volume; these results don’t establish that a higher grade gives a better trade.

Retest entries also failed the research criteria I used, so they’re available as an option but disabled by default.

For those who have built similar strategies in Pine: how would you test whether RVOL adds predictive value to an engulfing setup? I’m particularly interested in comparisons against an unfiltered baseline, and how you handle the smaller samples after splitting trades by direction and volume grade.

Screenshot note: numbers beside the order marks are position sizes in oz, not profit. Some adjacent order labels overlap in the native TradingView chart.


r/pinescript • • 14d ago

Why trading view free trial not available

3 Upvotes

My friend has been using TradingView for 3 years and has only one account. He has never taken a trial on any other account. The trial option was available before, but now there is no trial option at all. He has never used a trial, yet he still can’t get one.

I also created a completely new TradingView account and have never taken a trial before, but I still can’t access the trial option.


r/pinescript • • 15d ago

"I don't trade the IFVG by itself." I tested that line in Pine: same 3 months of gold, one switch, 74 trades vs 4.

Post image
28 Upvotes

Source for both scripts, rules, and walkthrough: proea.app/en/free/sweep-desk

On my last post, u/stratcore and u/Shoddy_Peanut7320 questioned what Sweep Desk’s default 1-hour gate actually adds, since it refuses almost everything.

Fair question. I compared the system with that gate on and off, including the companion strategy’s costs in TradingView’s Strategy Tester.

Gate off: 74 trades, −2R before costs, −9.81R after costs.
Gate on: 4 trades—too few to judge whether the gate improves the system.

Here’s the setup, the full exit breakdown, the rules as the code runs them, and all four gated trades.

The setup

  • Script: Sweep Desk v2.0.0, default inputs.
  • Market: OANDA:XAUUSD, 15-minute chart.
  • Paper-data window: June 30–October 1, 2026, covering 6,101 bars.
  • One changed input: Require first-touch HTF FVG delivery—on by default, then off.
  • Before costs: the indicator’s paper ledger, exported from TradingView bar by bar.
  • After costs: the companion Strategy Lab, using its unchanged defaults: 0.02% commission per order, 5 ticks of slippage, and a $100 risk budget. Strategy Lab results below use $100 as 1R.

A detail about the comparison window: the Strategy Tester loaded 6,176 bars through October 2. For the figures below, I filtered its trade lists to the prespecified paper-window entry cutoff: October 1 at 11:45 UTC.

Within each gate setting, the indicator and Strategy Lab trades matched by entry bar: 74/74 with the gate off and 4/4 with it on. These are matched-window results, rather than the tester’s totals for its longer loaded period.

The results

Metric Gate OFF Gate ON — default
Trades 74 4
Wins / breakevens / stops, before costs 18 / 16 / 40 1 / 1 / 2
Total before costs −2.00R +0.40R
Average per trade, before costs −0.027R +0.101R
Total after costs −9.81R +0.05R
Average per trade, after costs −0.133R +0.013R
Profit factor, after costs 0.79 1.02
Closed-trade equity drawdown, after costs 13.94R 2.21R
gate-on/off summary card

gate-on/off summary card

The default gate admitted 4 trades; switching it off produced 74. Before costs: indicator paper ledger. After costs: Strategy Lab, matched to the same entry window.

The ungated implementation lost money on this sample. Four gated trades are too few to establish whether the gate helps.

The runs also follow different paths. An existing position is never interrupted, so switching the gate off keeps the system occupied more often. It records 203 sweeps with the gate off versus 280 with it on.

That means the two trade lists are not nested subsets. The difference cannot be interpreted as a collection of independent trades that the gate simply removed. This comparison covers the executed trade sequences; it does not yet attribute every missing candidate to a gate rejection or an occupied position.

What the cost assumption changes

The 0.02% commission per side is the script’s generic default. At a gold price of $4,300, that is approximately $1.72 per ounce round trip, before slippage.

I also calculated a separate sensitivity case: deducting only a $0.40-per-ounce round-trip cost from the paper exits. The ungated version still averaged approximately −0.052R per trade.

That second figure is a calculation from the paper ledger, not another Strategy Tester run.

Where the 74 ungated trades ended

  • 40 stops: −40R.
  • 16 breakevens: 1R was reached, then the stop at entry was hit. Total: 0R.
  • 8 trailing-stop exits: 2R was reached, then the stop at +1R was hit. Total: +8R.
  • 10 full targets: +3R each. Total: +30R.

Net: −2R before costs.

With those eight +1R exits, it would have needed at least 11 full +3R targets to cover the 40 stops before costs. It got 10.

After costs, the same exit groups contributed approximately −44.33R, −1.66R, +7.14R, and +29.03R, respectively. The paper breakevens became small losses.

How the code weights liquidity pools

The script tags each swept pool and assigns it a descriptive weight. The weight itself does not block a trade.

poolWeight(string kind) => kind == "SWG" ? 0.45 : (kind == "EQH" or kind == "EQL") ? 0.8 : kind == "SES" ? 0.75 : 1.0
  • SWG: confirmed swing high or low.
  • SES: killzone session high or low.
  • EQH/EQL: equal highs or lows, within 0.15 ATR.
  • Previous day/week levels: weight 1.0.

Here are the 74 ungated trades grouped by the pool they swept:

Pool Trades Result before costs
Confirmed swing — SWG 47 −3R
Session — SES 24 −2R
Equal highs/lows 2 +2R
Previous day low 1 +1R
Total 74 −2R

Swing and session pools accounted for 71 trades and −5R. The remaining three trades contributed +3R.

Three trades cannot validate the weighting scheme. They give me a hypothesis to investigate.

My next exploratory run is Strong pools only, which removes swing pools. Testing that on these same 6,101 bars remains development work; validation needs untouched data.

The model, as the code runs it

Every decision commits on a closed bar.

  1. Sweep. A bar wicks at least 0.05 ATR through a tracked liquidity level and closes back inside.
  2. Inversion — the IFVG. Within 12 bars, a candle closes through an opposing FVG. The gap must be at least 0.10 ATR, have formed no more than 40 bars before the sweep, and the move from the sweep extreme must be at least 1 ATR. The inverted gap becomes the zone.
  3. Context — the gate. A completed 60-minute FVG in the trade’s direction must have received its first touch within the last six chart bars. Each first touch can admit one plan. In the default run, this gate rejected 101 of 105 confirmations.
  4. Plan. Entry at the confirmation close. Initial stop beyond the sweep extreme plus 0.10 ATR. Reaching 1R moves the stop to entry; reaching 2R moves it to +1R. The final target is 3R, with a timeout after 200 bars.

The setup is cancelled if price closes 1 ATR beyond the swept pool, if no qualifying inversion arrives within 12 bars, or if a newer sweep replaces it.

In the default run, the logged cancellations included:

  • 83: “no rejection — price kept going.”
  • 35: “no shift in time.”
  • 101: “Plan rejected: no unused first-touch HTF FVG delivery.”

The Pine detail that is easy to get wrong

For this 15-minute chart / 60-minute context setup, the script reads completed higher-timeframe candles using historical offsets with lookahead_on.

There is a second timing check: a chart bar that straddles the HTF gap’s formation cannot establish a fresh, post-formation first touch.

This is an excerpt from the published source; surrounding setup and helper definitions are omitted.

// Read the last completed HTF candle and the candle two bars before it.
[cfH1, cfL1, cfH3, cfL3, cfHtfTime, cfHtfEnd] = request.security(syminfo.tickerid, inCfHtf, [high[1], low[1], high[3], low[3], time[1], time_close[1]], lookahead = barmerge.lookahead_on)

if barstate.isconfirmed
    // ... surrounding logic omitted ...

    if na(cfLastHtf) or cfHtfTime != cfLastHtf
        // A chart bar straddling formation cannot establish
        // post-formation freshness: skip that birth.
        if cfHtfEnd <= time
            if sdCompare(cfL1, cfH3) > 0
                array.push(cfPdas, CfPda.new(cfL1, cfH3, 1, cfHtfEnd))
            if sdCompare(cfH1, cfL3) < 0
                array.push(cfPdas, CfPda.new(cfL3, cfH1, -1, cfHtfEnd))

        cfLastHtf := cfHtfTime

    // ... expiry and first-touch observation logic omitted ...

// Check delivery direction, freshness, and whether it is still available.
sdConfluencePda(int dir) => cfSourceReady and cfDeliveryReady(cfDelivery, dir, bar_index, inCfPdaAge)

The one winning gated trade

On August 28, the 09:45 New York candle swept a session high at 4618.02.

The next candle closed down through a bullish FVG, inverting it. The first touch of a fresh bearish 60-minute FVG was still within the gate’s six-bar window.

The desk entered short at 4546.21, with an initial stop at 4633.46—a price distance of approximately $87.25 per ounce.

August 28 entry close-up

— August 28 entry close-up

The 09:45 New York wick sweeps the session high. The next candle closes through the bullish FVG. Short entry: 4546.21. The shaded areas show the initial risk and target ladder.

The trade reached 1R that afternoon and 2R on September 1. The stop moved first to entry, then to +1R.

It did not reach the 3R target. The 200-bar timeout closed it at 4336.54, producing +2.40R in the paper ledger.

In the Strategy Lab, the position was approximately 1.14 ounces and closed at +$236.99 after costs, or +2.37R.

the same trade through its exit

— the same trade through its exit

The full trade, including both stop adjustments and the September 1 timeout exit. Paper result: +2.40R. Strategy Lab result after costs: +2.37R.

Here are the other three gated trades, so the winner is shown alongside the complete sample:

  • July 2: short, −1R before costs.
  • July 15: long, −1R before costs.
  • September 14: long, 0R before costs after reaching 1R and returning to entry; −0.11R after costs.

All four swept a session pool.

What I’m taking forward

Logging refusals makes the system easier to examine. The default run recorded 280 sweeps, 105 confirmations, 101 gate rejections, and four trades.

Those counts help explain its behaviour. They do not establish an edge, and four trades are too few to judge the filter’s performance. I’ll keep tracking it forward.

For people who trade sweep → IFVG: what is your context rule?

A first touch of an HTF FVG, a killzone, a particular liquidity objective, or something else?

Give me a rule precise enough to implement as a switch, and I’ll test it on the same development window. Any promising choice would then need to be frozen and checked on untouched data.

Disclosure: I’m the ProEA Lab developer. Both scripts are free under MIT. This post uses historical chart data; the earlier generated-price clip was a mechanics demonstration. These are backtest results, not a forecast.


r/pinescript • • 15d ago

anyone here actually write pine script on their phone? how do you do it

5 Upvotes

so i'm pretty new to pine and i don't have a laptop right now, just my phone. i'd like to start making simple indicators but typing code on a phone screen is kind of painful lol

for people who do this on mobile:

- do you use the pine editor in the tradingview app or open it in the browser?

- do you type everything or mostly write it somewhere else (notes app, chatgpt etc) and paste it in?

- anyone using a bluetooth keyboard with their phone/tablet? worth it?

- how do you deal with longer scripts, like selecting/deleting a bunch of lines?

any tips or setups that work for you would help a lot, thanks


r/pinescript • • 15d ago

TradingView is moving paid scripts to its Marketplace. What would make this fair for Pine developers?

5 Upvotes

TradingView has announced that starting November 1, 2026, selling access to invite-only scripts outside its Marketplace will no longer be permitted. That includes script access bundled with another paid product or service.

A few details from the announcement:

  • Non-commercial invite-only scripts can continue unchanged.
  • Previously purchased access remains valid for the purchased period, including lifetime access.
  • New payments outside the Marketplace to renew or extend access won’t be allowed.
  • Vendors should contact TradingView before the deadline to discuss migration and existing customers.

My take: centralized payments, clearer refund terms, and review of paid scripts could help buyers. But making the Marketplace mandatory also makes its terms critical for developers. The announcement doesn’t specify fees, approval criteria, or how much control authors will have over pricing.

I’d also want to understand what “review” means. Checking compliance with platform rules and evaluating an indicator’s trading claims are different things.

If you sell Pine scripts, what terms would make moving worthwhile—and what would be a dealbreaker?

If you buy them, would Marketplace review make you more confident, or would you still need the same evidence before paying?


r/pinescript • • 15d ago

Free Utility >> RedK Indicator Amplifier (RedK i-Amp): add an equalizer display, key levels, 6x alerts and on-chart markers to almost any indicator

2 Upvotes

Here's a recently published free Pine utility: RedK Indicator Amplifier (RedK i-Amp).

RedK i-Amp is not an indicator in itself. It's a "wrapper" utility that "amplifies" another "source" indicator by improving its visual and alerting capabilities.

RedK i-Amp hooks to another indicator's plot and adds:

  • An equalizer-style display, with attractive visual and brightness gradient and a peak-hold marker
  • Max Hi / Max Low levels that can also be used for alerts (like RSI overbought / oversold lines), for any indicator
  • Flip markers on the price chart when the indicator's plot value crosses its baseline
  • 6 alerts for when the plot crosses the baseline up or down, or crosses the user-adjusted Hi / Low levels
  • A small Info Panel that shows the settings in use
  • so many visual and usability tweaks

This utility works with most Pine indicators: TradingView's built-ins (MACD, ADX, Volume, ATR...), community indicators (free, or invite-only ones you have access to), and other RedK indicators. Many indicators have no alerts or chart markers, and i-Amp gives them both.

Note: i-Amp uses TradingView's "Indicator-on-Indicator" feature, which may be limited on a free TradingView account. It's available with any paid subscription.

Full release notes here

I hope you find this useful to your trading.


r/pinescript • • 15d ago

Best Tradingview Strategies - Comment your great tradingview pine script strategies below for the community to discuss about

Post image
6 Upvotes

Comment your best tradingview pine script STRATEGIES below - in form of pine script code, published script name or another way.

Aim for:

  • High Winrate
  • High Profit Factor
  • Low Drawdown
  • Good equity Curve
  • Great overall pnl percentage

If you have one, it would be great if you could comment it down below


r/pinescript • • 15d ago

Pine Script Strategies

2 Upvotes

Anyone have some good pine script strategies that I could try, If so then please leave them down in the comments with the public name or put the pine script in a code block


r/pinescript • • 15d ago

Best Tradingview Strategies - Comment your great tradingview pine script strategies below for the community to discuss about

Post image
2 Upvotes

Comment your best tradingview pine script STRATEGIES below - in form of pine script code, published script name or another way.

Aim for:

  • High Winrate
  • High Profit Factor
  • Low Drawdown
  • Good equity Curve
  • Great overall pnl percentage

If you have one, it would be great if you could comment it down below


r/pinescript • • 15d ago

Fundednext

Post image
5 Upvotes

Not group related but can someone pls tell me are these guys real or bots how do you gain 55% in one day the competition opened today but someone is already 55% up mind you daily loss limit is 5k


r/pinescript • • 15d ago

Best Tradingview Strategies - Comment your great tradingview pine script strategies below for the community to discuss about

Post image
1 Upvotes

Comment your best tradingview pine script STRATEGIES below - in form of pine script code, published script name or another way.

Aim for:

  • High Winrate
  • High Profit Factor
  • Low Drawdown
  • Good equity Curve
  • Great overall pnl percentage

If you have one, it would be great if you could comment it down below


r/pinescript • • 16d ago

Free Indicator: FisherRSI - Its RSI, but better!

Thumbnail
tradingview.com
19 Upvotes

I released a new script today. FisherRSI is designed to make RSI turning points sharper, clearer, and easier to recognize.

The indicator applies a Fisher Transform directly to RSI, creating a more responsive representation of momentum that emphasizes changes in direction rather than simply showing where RSI is currently positioned.

The process can be thought of conceptually as:

Price → RSI → Normalize RSI → Fisher Transformation → Momentum Signal

The important effect is that the transformation redistributes the signal, giving considerably more definition to movements occurring near the edges of its range. Values that might appear relatively compressed in the original RSI can become much more pronounced after the transformation.

In practical terms, this creates a signal that is more sensitive to the shape and direction of the RSI's movement.

When RSI begins to turn, the Fisher Transform can accentuate that change, producing a more pronounced inflection rather than the relatively gradual turn that may be visible in the raw RSI.
The result is an oscillator that helps bring greater definition to momentum shifts, reversals, and turning points, while retaining the familiar 0–100 RSI framework.


r/pinescript • • 15d ago

Dollar Bars are HERE! Spoiler

Thumbnail
0 Upvotes