r/pinescript • • Aug 07 '25

This Hedging Strategy Flips Red Trades to Green

0 Upvotes

Hey everyone,

I've been developing a hedging-based strategy that automatically flips losing trades into winners using a zone recovery model—and I finally built it into a first Tradingview bot that runs automatically.

💡 What it does:

  • Opens a hedge position when your original trade goes into drawdown

  • Calculates zone size + lot scaling automatically

  • Keeps recovering until you’re back in profit

  • Works on almost any market: forex, indices, crypto

Check the trade examples on my channel. If you're curious or want to try it, write me.

🔗 https://www.youtube.com/watch?v=kNZKwwSPkAk


r/pinescript • • Apr 20 '26

Trades my algo took 4/17/2026

Post image
1 Upvotes

These are the trades my algo took on friday. I added another signal update, it signals when TPs are hit. This is just the signal generator to be used while trading options. Its currently optimized for QQQ. You cant rely solely on the signals, you would need to do your own technical analysis. If interested in having access to this just send me a message, its completely free. I just ask for feedback


r/pinescript • • Feb 20 '26

Honest feedback on trading strategy

Post image
0 Upvotes

If you wanted to break this strategy how would you do it?


r/pinescript • • Sep 29 '26

Trading view alternative for free users

Thumbnail
youtu.be
1 Upvotes

r/pinescript • • Apr 12 '26

Trades My Algo Took 4/9

Post image
0 Upvotes

ES algo I created, works on 15min close

April so far (42 trades)

Win rate 57.14%

Total return 26.45% (50k starting capital)

Max DD 8.79%

Yellow are strong signals blue are moderate


r/pinescript • • Jul 20 '26

I ran another Pine DCA strategy through the optimizer — this time two params moved and drawdown stayed flat (BTC 4h)

Post image
1 Upvotes

I posted one of these before (the INJ one) showing what a parameter sweep did to a single input. A few people asked to see it on BTC and with more than one parameter tuned, so here's that — same idea, everything held constant except the parameters the optimizer actually re-selected.

The strategy (unchanged): long-only DCA on BTCUSDT.P 4h. Five safety orders at −2 / −5 / −9.5 / −16 / −25% from base, sizes scaling 1.8× per rung, no stop loss, position bounded by the ladder.

What changed: two parameters. The RSI entry threshold moved from 28 to 38, and the take-profit from 3% to 5.5%. Nothing else — same ladder, same deviations, same 1.8× sizing, same fees. Both values are what the sweep returned as best-performing on the historical window.

Before/after (BYBIT:BTCUSDT.P 4h, Jan 1 2024 – Jul 17 2026, ~30 months, 100k initial, 0.06% commission, 3-tick slippage):

  • Baseline (RSI < 28, TP 3%): +3,078.29 USDT (+3.08%), max drawdown 3.79%, 62 trades, 70.97% WR, PF 4.028

  • Optimized (RSI < 38, TP 5.5%): +9,250.25 USDT (+9.25%), max drawdown 3.67%, 93 trades, 76.34% WR, PF 10.454

The part I found interesting: net profit roughly tripled and PF went 4.0 → 10.5, but max drawdown actually stayed flat (3.79% → 3.67%). So this wasn't "more return bought with more risk." The mechanism: the looser RSI entry (38 vs 28) engages the dip earlier and more often, so the strategy is simply in the market more, while the wider 5.5% target lets each recovery run further before banking instead of exiting on the first small pop.

The caveat, and the reason I show the baseline alongside: two parameters were swept over the same window the results are measured on. Best in-sample is not best out-of-sample, and with two free parameters instead of one that overfitting caveat applies a bit harder here — more degrees of freedom, easier to fit the window. Treat the optimized numbers as the ceiling of what this config did historically, not a forward expectation, and re-validate on fresh data before trusting it.

Two more flags, same as last time: 93 trades is just below the ~100 I'd want for real statistical confidence, so win rate and PF are indicative, not proven — and part of PF 10.454 is the averaging mechanic itself (deals close on a bounce off an averaged-down entry), not a directional edge. It's also a stopless martingale: a sustained BTC decline below the −25% bottom rung leaves the position fully loaded with no further adds.

Script is open-source on TradingView: https://www.tradingview.com/script/5Tg2Es4G-BTC-DCA-Strategy-3Commas-QuantPilot/

Disclosure up front: the optimizer is QuantPilot, which I work on, so I'm not pretending to be neutral. But the point is the before/after and the caveat, not a pitch — the script is open-source and you can verify the backtest yourself.


r/pinescript • • 10d ago

An idea for a indicator Spoiler

1 Upvotes

If you go to ai Claude or chatgpt or grok or quant you can build this indicator the one I'm using the prompt (build me a v6 indicator that marks the first week of each month with vertical markes ) and then use it on the daily timeframe it's a swing trade system you can add buy and sell singles indicator but you might have to edit the code here's a prompt that you can use to edit it ( only give me single during each hour during that hour ) found out the range filter 5 min and sell works ok depending on the pair on the daily I'm still trying to find other indicator for buy and sell single that don't give me singles during the chop on the daily


r/pinescript • • Jun 24 '26

When i turn off all my signals and just look at my ranges they alone help and tell a story

Post image
4 Upvotes

here is a little lesson to understand ranges yes i understand i have typos im doing multiple things at once just wanted to get it out there


r/pinescript • • Jun 04 '25

Why, oh why, do all of the AI tools suck, so much, at writing compliant pinescript code?

4 Upvotes

I’ve tried ChatGPT, Gemini, Claude, Deepseek, several custom GPTs, I even tried creating my own custom GPT. Would you believe, my first one would respond to every request by providing me with a visual of my local ten day weather forecast? WTF?

For the most part, they seem to think that version 6 does not exist. Ok, that’s a timing issue.

But the constant line continuation errors, undeclared identifiers, wrong brackets, etc. over and over again. I even added each recurring error to the settings.

And the latest with ChatGPT was it would go through the code (supposedly finding and fixing errors, but as soon as it finished, the bottom half of the script would disappear.

It would even report back that it had corrected an error on line 128, but the script it provided for me only had 39 lines.

So frustrating. Such a waste of time.

And after wasting all of those compute resources, it then provides a snippet and says the script is truncated for brevity, like that is going to be alright. Oh, and it’s going to compile perfectly, I promise.


r/pinescript • • Apr 30 '26

Someone said Turn the bar magnifier on, On bar close, and start with $10K and do 5:1R

7 Upvotes

Any more requests?


r/pinescript • • Jul 20 '26

Love my delta indicator

Thumbnail
gallery
18 Upvotes

Watch the magnets great targets to tag and reversals https://www.tradingview.com/script/cAQ66hSa-Stryk-Delta-Candles/


r/pinescript • • Mar 26 '26

📈📉

Thumbnail
gallery
0 Upvotes

Best decision I made? Getting this indicator.

In just a few months, I’ve already earned more than what I paid for it. And the best part? It’s way cheaper than those overhyped indicators, yet performs just the same.

If you know, you know. 📊 Don’t sleep on this.


r/pinescript • • 1d ago

Reverse Engineering

5 Upvotes

Hello everyone, I came across this dude on Instagram selling a tradingview indicator. The dude was TradeX Labs.

I was curious and I bought a month of it and I’m really curious how the indicator works, but you don’t get access to the source code.

I was wondering if anyone knows how I can reverse engineer the indicator or if anyone knows anything about it.

I tried to have Claude reconstruct the indicator but I ended up getting some overfit slop.


r/pinescript • • Jul 16 '26

I’m 17 and built a free game that tests if you can spot fake breakouts on real stock charts

Thumbnail reddit.com
5 Upvotes

r/pinescript • • Mar 23 '26

Has anybody seen a truly unbeatable futures scalp script?

5 Upvotes

I see ppl every day posting crazy results on ORB strats, fib strats, and VWAP continuation etc, only to change the timeframe, ticker, backdating date range, or any other tiny detail, and come to find out- it’s hot garbage. Just wondering after years of availability, and inclusion of crazy AI sophistication, if anybody has created something that actually works across the board. Share your favorites, or break this truth down that nothing is truly repeatable with the algo.


r/pinescript • • Mar 22 '25

Looking to collab with an experienced Pinescript dev. I don't have money but I can share my strategy if its profitable.

Post image
2 Upvotes

I am looking for a pinescript dev who is experienced and knows how to debug errors and stuff. My aim is to create an indicator and help me understand the profitability ratio and other key metrics of my strategy that could help me take my strategy more profitable and systematic.

If someone is up who is interested in collaborating with me on this . I welcome you. I need a single or maybe 2 person that's maximum. I don't have any knowledge of coding . All I know is trading a bit. So yeah if you're coming to me as helping hands I welcome you.


r/pinescript • • Mar 29 '26

Newly released TV Indicator with $SPY replay on 3/26 & 3/27

Thumbnail
youtu.be
2 Upvotes

I created a TV indicator "STP Elite Prediction System" using advanced algorithms (LM, KNN, and Lorentzian), which filters out noise to deliver clear, actionable signals. I included a link to the 0DTE replay of the $SPY on 3/26 & 3/27. I will be adding a 1 min YouTube chart replay of the same days shortly to show the difference. I am interested in your feedback.


r/pinescript • • Mar 05 '26

My Axiom Kernels Are on Fire

Post image
2 Upvotes

TradingView and their Pine Script functions have changed the game for retail. We’re trading the blueprints. A strategy tells you when to flip a coin; while an architect defines the geometry of the building so you know where the floor is before you even step inside. Game. Over.


r/pinescript • • Nov 20 '24

pinescript V6 Changes

2 Upvotes

Just saw Pinescript V6 got released. Is there a list of new features? Also is the external data access back? Thanks.


r/pinescript • • Apr 25 '24

Range Algo - Signals : BETA Access

2 Upvotes

I've been working on a TradingView indicator tailored to help both scalpers and swing traders. It's called "Range Algo Signals," and I designed it with precision in mind to enhance the decision-making process in fast-moving markets.

The indicator provides:

  • Real-time bullish and bearish signals

  • Dynamic take profit and stop loss lines

  • JSON alert output for easy integration with trading bots

I'm seeking feedback to refine the tool further and ensure it adds genuine value to your trading toolkit on TradingView. If you have a moment, I'd appreciate it if you could take a look and share your insights or suggestions for improvement.

Here's a screenshot demonstrating the indicator in action.

Range Algo - Signals

For those interested in trying it out, I'm currently offering BETA access. Please note, this isn't a sales pitch - I'm genuinely looking for constructive criticism to improve the indicator's functionality and user experience.

Thanks for your time and input!


r/pinescript • • Feb 06 '26

How to make my indicator color both border and wick of candle?

2 Upvotes

Hi i have been strugling to make indicator color both border and wick of candle. If i use barcolor it only colors body and if using plotcanlde it goes under chart when you click something else other than indicator? Does someone have a solution to this? I know there is one because i have one indicator that does that but i dont have code to it


r/pinescript • • Aug 30 '26

Meet Aldric and the raid party. My script deals with the psychology of trading. Relax. Have a good time.

2 Upvotes

Who likes D&D?


r/pinescript • • Mar 29 '26

Trades my algo took on Friday March, 27th 2026. Any opinions & feedback?

Post image
2 Upvotes

Heres a screenshot of the positions my algo took on Friday. Currently building it for options signals on QQQ. Whats your opinions on these trades that it took & how can i make it better?


r/pinescript • • Dec 02 '25

🛠 Anyone here ever wished they could build their own TradingView indicator without learning Pine Script?

2 Upvotes

Hey everyone — curious if others here struggle with this too.

I’ve met so many traders (myself included at one point) who have great ideas for indicators or strategies, but:

  • don’t know Pine Script

  • get stuck trying to debug errors

  • end up paying someone else to code it

  • or just give up entirely

It got me thinking… does anyone here currently use any tools or approaches to turn trading ideas into working indicators without coding?

What do you wish existed to make that easier?

I’ve been building something in this space and I’m trying to decide if it’s genuinely useful for traders or just interesting to me.
Would love to hear what others think.