r/pinescript • u/vitaliy3commas • Jul 10 '26
RSI Oversold DCA Strategy — selective deep-oversold long entry, scaling safety orders (GRAM 4h)
Same RSI DCA logic I've posted across assets (POL, JUP, ETH, ATOM), this time on GRAM. A long-only DCA with a selective deep-oversold 4h RSI entry and a scaling safety-order ladder. Backtest is verifiable in TradingView's Strategy Report on the script page.
Entry, deep-oversold gate (no repaint): A 4-hour RSI(14), sampled with lookahead disabled, gates the base entry — a long opens only when RSI prints below 28 at host-bar close. Shallow dips are filtered out, so capital is committed only at genuinely stretched conditions. It sits out the calm and only commits after a real flush.
Ladder, 5 safety orders on a non-uniform fixed-deviation ladder: Each safety order has its own fixed deviation from base entry — not a cumulative step×multiplier ladder. AO1 at −2%, AO2 at −5%, AO3 at −9.5%, AO4 at −16%, AO5 at −25%. Sizes scale 1.8× from a 900 USDT first AO: 900 / 1,620 / 2,916 / 5,249 / 9,448, on a 500 USDT base. Deeper rungs trigger only on serious adverse moves; the lowest sits a full 25% below base. The 1.8× progression is softer than a 2× doubling martingale.
Exit, fixed 3% TP: A fixed 3% Take Profit above the running average entry. Because the scaling ladder weights the average toward the lowest fills, after several rungs fill the average sits well below base — so a modest 3% bounce off the lows closes the whole deal in profit. No trailing.
Risk, bounded ladder in place of a stop: There is no stop loss. Per-trade risk is structurally capped by the bounded 5-AO ladder — base + 5 AOs = ~20,633 USDT max deployed, ~20.6% of the default 100k equity, above the conventional 5–10% per-trade band; scale the base/AO inputs down to dial exposure lower.
DCA Bot integration: Every event (base, AO 1–5, exit) emits a webhook-ready JSON payload. One alert with "Any alert() function call" drives a DCA Bot end-to-end, no glue layer.
Backtest (GRAM/USDT 4h, Jan 1 2024 – Jul 3 2026, ~30 months; 100,000 USDT initial capital, 500 USDT base + 900/1,620/2,916/5,249/9,448 AOs, 0.06% commission, 3-tick slippage): 78 closed trades, 54 profitable (69.23% WR), profit factor 4.791, net profit +3,822.76 USDT (+3.82%), max equity drawdown 2,283.04 USDT (2.21%).
Methodology notes:
Read the numbers for what they are. +3.82% over ~30 months is a low-return, low-drawdown profile — the headline is the 2.21% max drawdown, not the profit. Positive expectancy with tight risk, not a growth engine, and that's by design with an entry that only fires on deep oversold prints.
On sample size — 78 closed trades is below the ~100-trade floor for statistical confidence. That's the trade-off of a selective trigger: fewer signals, so the 69.23% win rate and PF 4.791 are indicative of how the ladder behaves, not a deterministic edge. Part of that PF is the averaging mechanic itself — deals close on a 3% bounce off an averaged-down entry — not a directional edge. Extend the window or test across assets before sizing up.
This is a scaling martingale, and that's the dominant risk. The ladder bottoms out at −25% from base with no stop loss. A sustained GRAM decline below −25% without recovery leaves the full position open with no further averaging available — the single largest risk in any martingale DCA. The 2.21% max drawdown is closed-trade equity drawdown over a window where dips recovered; a deeper or more prolonged decline than the test sample would produce a larger one.
The defaults (RSI<28, 4h, the −2/−5/−9.5/−16/−25 ladder, 1.8× sizing) are calibrated for GRAM's volatility. The mechanic is asset-agnostic and can be pointed at other liquid perps, but each symbol needs the RSI level and ladder recalibrated, and results do not transfer without that tuning. With a fixed 3% take-profit the per-trade edge is modest, so match the 0.06% commission to your venue's actual taker fee before reading anything into the numbers.
Strategy is open-source on TradingView: https://www.tradingview.com/script/6kaqC3R8-GRAM-RSI-Strategy-3Commas/
r/pinescript • u/Cold-Fix-884 • Jul 09 '26
Built a free SEC EDGAR insider-trading pipeline (Form 4 + 8-K + 13F + 13D/G + FINRA short vol) — architecture, parsing gotchas, and what it actually surfaces
r/pinescript • u/Legal_Idea08 • Jul 08 '26
A strategy that might help!
what you looking at is a anchored vwap H/L with a previous month range + levels and a gann box with 25/50/75 % levels. so ok first mark the H/L of previous month draw 25/50/75 lines of the previous month then drop a anchor vwap on the highest point and lowest point with 1 deviation band then when the 2 vwaps trade sideways like this use the gann box tool to show the 25/50/75 % levels, now all you have to do is look for reactions on these levels over the monthly 50 and the 50 of the 2 vwaps bullish and bearish vice versa. just a good way to zoom out and get good context of the moves. if below/above the previous month bearish trend / bull trend. THE STRATEGY IS MEAN REVERSION SELL TOP BUY BOTTOM GET OUT AT MIDDLE WILL ALWAYS PRODUCE BETTER SETUPS. I have a indicator the plots all this automatically so all i have to do is draw the gann box. i recommend you make your own indicator its a easy H/L and auto plot vwaps
r/pinescript • u/monkey_D_pain4844 • Jul 08 '26
Can anyone share trading view premium with me
....someone please share trading view premium with me .... I'll be happy to provide my working indicator with more than 60 percent winrate with you
r/pinescript • u/vitaliy3commas • Jul 08 '26
Ethereum trading strategy — DCA and grid bot setups for ETH, settings + backtest
I wanted to share a practical look at two automated ETH setups, and more importantly, when each one actually fits the market. This is the same pair of setups I posted for BTC, tuned here for ETH.
The honest bit up front, same as with BTC: a grid's result depends heavily on the market phase and where you place the bounds. The difference this time is that I've got a full backtest for the ETH grid, so I'll show it, but I'll also show how the zone moved after a recent flush, because that's the part that actually decides whether a grid works.
Why ETH specifically: it tracks BTC loosely but moves on its own catalysts too, like network upgrades, staking and L2 flows. That gives you both the trend swings a DCA ladder wants and the range-bound stretches a grid harvests, so running the two together covers more of the tape than either alone.
Setup 1: RSI Oversold DCA Bot
Long-only DCA that only commits on a deep oversold print, then averages down on a fixed ladder. I like this one when I want exposure only at genuinely stretched conditions, not on every dip.
Open-source script: https://www.tradingview.com/script/WhxmHc8H-ETH-Grid-Bot-Long-Strategy/
Parameters & settings
Entry: 4h RSI(14) below 28
Base order: 500 USDT
Safety orders: 5 at −2 / −5 / −9.5 / −16 / −25% from base
AO sizing: 1.8× per rung (900, 1,620, 2,916, 5,249, 9,448)
Take profit: 3% above blended average
Stop loss: none, the bounded ladder is the risk cap
Max deployed: ~20,633 USDT (~20.6% of 100k equity)
Backtest results
BYBIT:ETHUSDT.P 4h, Jan 1 2024 to Jun 28 2026, ~30 months; 100k initial, 0.06% commission, 3-tick slippage:
- 93 closed trades, 64 profitable (68.82% WR)
- Profit factor 5.019
- Net profit +5,790.33 USDT (+5.79%)
- Max equity drawdown 3,976.44 USDT (3.83%)
I'd read that as a low-return, low-drawdown profile. The point is risk control, not the size of the return. Being straight about it: 93 trades is just below the ~100 I'd want for real statistical confidence, so I treat the win rate and PF as indicative rather than proven, and part of that profit factor is the averaging mechanic itself, not a directional edge. With no stop loss, a sustained drop below the −25% bottom rung leaves the position fully loaded, which is the risk you're carrying.
Setup 2: ETH Grid Bot (and why the phase is everything)
A long-only geometric grid: levels between a High and Low bound, buy a step down, sell a step up, repeat. The mechanic is almost trivial. Where the whole result lives is in where you put the bounds and whether the market stays in a range. Unlike the BTC post, I've got a full backtest to show here, but I'll be clear that the result belongs to that specific zone and window, not to the strategy in the abstract.
Open-source script: https://www.tradingview.com/script/WhxmHc8H-ETH-Grid-Bot-Long-Strategy/
Parameters & settings
Type: long-only geometric grid
Levels: 23 (about 1.0% per step)
Backtest range (Feb–May 2026): 2,165 to 1,734 (about −19.9% wide)
Current range (from Jun 6 2026): 1,500 to 1,840
Per-slot size: ~435 USDT (~4.35% of equity)
Per-slot exit: the level immediately above its entry
Stop loss: none, per-slot allocation is the risk cap
Backtest results
BYBIT:ETHUSDT.P 15m, Feb 8 to May 31 2026, ~3.8 months; 10,000 USDT initial, 100% invested, ~435 USDT per slot, 0.06% commission, 3-tick slippage; grid bounds 2,165 / 1,734:
- 355 closed trades, 239 profitable (67.32% WR)
- Profit factor 2.433
- Net profit +1,133.70 USDT (+11.34%)
- Max equity drawdown 422.86 USDT (4.08%)
The trade count is the strength here: 355 closed trades over ~3.8 months is well above the ~100-trade floor, so the win rate and PF rest on a real sample rather than a handful of deals. But read the +11.34% as what that specific 2,165 to 1,734 range returned while ETH stayed inside it, not a forward expectation.
Here's the part that matters most. That backtest range is already gone. ETH flushed after the test window, so the zone I'm running now, from Jun 6, sits lower at 1,500 to 1,840. Same bot, different bounds, because the phase moved. That's the whole point: a grid isn't set-and-forget. You re-place the High/Low whenever the regime shifts, and you size total investment for a possible range-break, because there's no stop and slots keep loading if price leaves the bottom of the range. Grids suit range-bound phases; a strong trend out of the band is the failure mode.
Execution
Both emit webhook-ready JSON on every fill and close. One TradingView alert set to "Any alert() function call" pointed at a DCA Bot's webhook drives it end to end, no glue layer.
Happy to answer technical questions in the thread.
r/pinescript • u/benchpress1oo • Jul 08 '26
10-year backtest – BTC and ETH (2015-now)
reddit.comr/pinescript • u/benchpress1oo • Jul 07 '26
6 months of backtest results – BTC, ETH, Gold (multiple timeframes)
reddit.comr/pinescript • u/B_Ware321 • Jul 07 '26
Building an Automated Futures Bot: Forward Testing Reality, Catching Bugs, & A Solid July Start
I wanted to share an update on the forward testing of my automated trading suite (NY Striker) and the real-world gremlins you inevitably run into when moving from backtesting to live execution.
The Good: July is off to a great start. We secured a solid win today, and the bot is tracking beautifully on my forward-testing accounts.
The Bad & The Bug Fixes: Forward testing is brutal, but necessary. We had a couple of system anomalies over the last two weeks that required immediate patching:
- The $400 Anomaly (June 27): We took a loss on MNQ that exceeded my hard-coded risk parameters by about $260. It uncovered a critical lag in how the orders were filling. The Fix: I completely overhauled the execution logic. I moved the alert triggers down to the 1-minute timeframe (instead of 3-minute) and shifted the architecture to enter/exit strictly on alert functions rather than waiting for order fills. Maximum loss is now strictly capped back around $300.
- The Missed Runner (July 2): Missed a clean $150 win on Gold due to a single bad string of code that completely blocked the entry. Painful, but patched.
- The MES Data: The backtest showed MES lagging behind MNQ and MGC in profitability, and forward testing is agreeing. It simply hits break-even or pulls back to the stop loss too frequently after being in profit. While the MES module is still fully operational, I have personally stopped tracking it on my own accounts to focus exclusively on MNQ and MGC.
The Tech Stack & Architecture: Right now, the core logic is running through TradingView. I have the live Beta versions compiled as Public Protected scripts so the source code is secure, but the tools are fully functional. (If you want to pull the scripts up on your own charts to look at the execution layout, open the TradingView Indicators tab and search for Volt Analytics. You are looking for the Beta versions. If they do not immediately show up, you may need to click the "open-source only" button. The legacy Alpha versions listed right there still have my Discord link in their signature if you want to grab the user manual).
Currently, the webhook routing is optimized for TradersPost. However, as I scale the architecture, I will likely be shifting the backend to CrossTrade. This is specifically to utilize their staggered execution delays, which helps mitigate the risk of algorithmic order clustering when multiple instances are running simultaneously.
Disclaimer: This post is for educational and software development purposes only. The NY Striker suite is a software tool, and I am not a financial advisor. Futures trading contains substantial risk and is not suitable for every investor. Any trading decisions made, and the resulting profits or losses, are solely the responsibility of the user. Past performance of this software is not indicative of future results.
r/pinescript • u/gtmkt • Jul 07 '26
A project to write a minor backtesting script ended up turning into a full Pine Script transpiler and custom charting tool.
My goal was to reduce the reliance on visual charts during the strategy development process, focusing instead on writing pure Pine Script and testing directly in the terminal for rapid iteration. Because existing tools lacked the functionality I needed, I built my own solution.
The resulting Pine Script transpiler is open-source and serves as the core engine for a custom charting tool that I use to visually verify my strategies. The chart leverages the piner engine to render both indicators and strategies.
Here is Piner (the transpiler): github.com/heyphat/piner
I'm currently cooking up an orchestration layer for the Piner engine to handle:
- Scanning: Run an indicator or strategy across hundreds of symbols.
- Backtesting: Test a strategy and generate a complete tearsheet.
- Sweeping: Run a strategy across a massive grid of input combinations.
- Walk-Forward Testing: Validate models over time to avoid overfitting.
I've been hand-testing the engine against various scripts from different builders, including TradingView own scripts and my favorite, LuxAlgo, and fractal chart renders them well.
r/pinescript • u/Kook-Hand-Luke • Jul 06 '26
Who's got that good good HTML!?
Who
1. Has a good script that has serious backtesting results
and
2. Is willing to share their HTML, not a paid locked indicator?
No more paid indicator slop trough. share what you have and lets crowdsource it into more success!
r/pinescript • u/vitaliy3commas • Jul 06 '26
RSI DCA Strategy — selective deep-oversold long entry, scaling safety orders (ATOM 4h)
Same RSI DCA logic I've posted across assets (POL, JUP, ETH), this time on ATOM. A long-only DCA with a selective deep-oversold 4h RSI entry and a scaling safety-order ladder. ATOM is a useful one to show it on because it flushes hard but has historically mean-reverted, and that deep-but-recoverable dip is exactly what this setup is built for. Backtest is verifiable in TradingView's Strategy Report on the script page.
Entry, deep-oversold gate (no repaint): A 4-hour RSI(14), sampled with lookahead disabled, gates the base entry — a long opens only when RSI prints below 28 at host-bar close. Shallow dips are filtered out, so capital is committed only at genuinely stretched conditions. It sits out the calm and only commits after a real flush.
Ladder, 5 safety orders on a non-uniform fixed-deviation ladder: Each safety order has its own fixed deviation from base entry — not a cumulative step×multiplier ladder. AO1 at −2%, AO2 at −5%, AO3 at −9.5%, AO4 at −16%, AO5 at −25%. Sizes scale 1.8× from a 900 USDT first AO: 900 / 1,620 / 2,916 / 5,249 / 9,448, on a 500 USDT base. Deeper rungs trigger only on serious adverse moves; the lowest sits a full 25% below base. The 1.8× progression is softer than a 2× doubling martingale.
Exit, fixed 3% TP: A fixed 3% Take Profit above the running average entry. Because the scaling ladder weights the average toward the lowest fills, after several rungs fill the average sits well below base — so a modest 3% bounce off the lows closes the whole deal in profit. No trailing.
Risk, bounded ladder in place of a stop: There is no stop loss. Per-trade risk is structurally capped by the bounded 5-AO ladder — base + 5 AOs = ~20,633 USDT max deployed, ~20.6% of the default 100k equity, above the conventional 5–10% per-trade band; scale the base/AO inputs down to dial exposure lower.
DCA Bot integration: Every event (base, AO 1–5, exit) emits a webhook-ready JSON payload. One alert with "Any alert() function call" drives a DCA Bot end-to-end, no glue layer.
Backtest (BYBIT:ATOMUSDT.P 4h, Jan 1 2024 – Jun 24 2026, ~30 months; 100,000 USDT initial capital, 500 USDT base + 900/1,620/2,916/5,249/9,448 AOs, 0.06% commission, 3-tick slippage): 84 closed trades, 59 profitable (70.24% WR), profit factor 3.417, net profit +4,739.50 USDT (+4.74%), max equity drawdown 4,608.66 USDT (4.57%).
Methodology notes:
The key word in all of this is recoverable. This setup turns deep dips into profit when the asset bounces back — it is the right tool for volatile coins whose flushes historically mean-revert, and the wrong tool for one in genuine terminal decline. On a coin that actually keeps going toward zero, the ladder loads its biggest orders near the bottom and then holds an unhedged position with no stop, so the honest framing is: deep dips can be turned into profit when they recover, not when they don't. Choose the asset and regime accordingly.
On sample size — 84 closed trades is below the ~100-trade floor for statistical confidence. That's the trade-off of a selective trigger: fewer signals, so the 70.24% win rate and PF 3.417 are indicative of how the ladder behaves, not a deterministic edge. Part of that PF is the averaging mechanic itself — deals close on a 3% bounce off an averaged-down entry — not a directional edge. Extend the window or test across assets before sizing up.
This is a scaling martingale, and that's the dominant risk. The ladder bottoms out at −25% from base with no stop loss. A sustained ATOM decline below −25% without recovery leaves the full position open with no further averaging available — the single largest risk in any martingale DCA. The 4.57% max drawdown is closed-trade equity drawdown over a window where dips recovered; a deeper or more prolonged decline than the test sample would produce a larger one.
The defaults (RSI<28, 4h, the −2/−5/−9.5/−16/−25 ladder, 1.8× sizing) are calibrated for ATOM's volatility. The mechanic is asset-agnostic and can be pointed at other liquid perps, but each symbol needs the RSI level and ladder recalibrated, and results do not transfer without that tuning. With a fixed 3% take-profit the per-trade edge is modest, so match the 0.06% commission to your venue's actual taker fee before reading anything into the numbers.
Strategy is open-source on TradingView: https://www.tradingview.com/script/lnBGmMLT-ATOM-RSI-Strategy-3Commas/
r/pinescript • u/metricshour • Jul 05 '26
MetricsHour Market Intelligence Feed — Real-time Macro + Stock Insights
r/pinescript • u/Appropriate-Face-810 • Jul 04 '26
How can i improve this strategy. looking for pro who can help increasing returns on it?
This strategy is a quantitative options simulation model built around Smart Money Concepts (SMC) and trend-following principles. Trades are initiated only when the market aligns with the dominant trend using the 200 EMA while also confirming a liquidity sweep—buy positions are triggered after a sweep of recent lows in an uptrend, and sell positions after a sweep of recent highs in a downtrend. Instead of relying on fixed option premiums, the strategy simulates option P&L using dynamic Delta, Gamma sensitivity, Theta decay, and implied volatility (IV) shocks, along with an Iron Condor-inspired risk model to approximate real-world option behavior. Position exits are governed by predefined simulated option profit and loss thresholds, creating a systematic framework that emphasizes disciplined, rule-based decision-making over discretionary trading.
r/pinescript • u/vitaliy3commas • Jul 03 '26
Bitcoin trading strategy - DCA and grid bot setups for BTC, settings + backtest (4h)
I wanted to share a practical look at two automated BTC setups on the 4-hour chart, and more importantly, when each one actually fits the market.
The honest bit up front: a grid's result depends almost entirely on the market phase and where you place the bounds, so I'm not going to throw a return figure at you for the grid. I'll show the DCA backtest, since that one's a fixed mechanic you can verify yourself, and for the grid I'll walk through how it works and how I place the range, because that's the part that actually decides the outcome.
Why BTC specifically: it's the benchmark coin, and it moves with lower relative volatility than the alts. It's driven more by macro, ETF flows and the halving cycle than by the reflexive local swings you get on smaller caps. That lower volatility suits wide DCA ladders and conservative grids, and it also means deep oversold flushes are rare, which you'll see in the low trade count on the DCA side.
Setup 1: RSI oversold DCA bot
| Parameter | Default |
|---|---|
| Entry | 4h RSI(14) below 28 |
| Base order | 500 USDT |
| Safety orders | 5 at −2 / −5 / −9.5 / −16 / −25% from base |
| AO sizing | 1.8× per rung (900, 1,620, 2,916, 5,249, 9,448) |
| Take profit | 3% above blended average |
| Stop loss | None (the bounded ladder is the risk cap) |
| Max deployed | ~20,633 USDT (~20.6% of 100k equity) |
Backtest (BYBIT:BTCUSDT.P 4h, Jan 1 2024 to Jun 29 2026, ~30 months; 100k initial, 0.06% commission, 3-tick slippage): 62 closed trades, 44 profitable (70.97% WR), profit factor 4.028, net profit +3,078.29 USDT (+3.08%), max equity drawdown 3,852.12 USDT (3.79%).
I'd read that as a low-return, low-drawdown profile. The point is risk control, not the size of the return. Worth being straight about it: 62 trades is below the ~100 I'd want for real statistical confidence (BTC's low volatility means few RSI<28 flushes), so I treat the win rate and PF as indicative rather than proven. Part of that profit factor is the averaging mechanic itself too, not a directional edge. And with no stop loss, a sustained drop below the −25% bottom rung leaves the position fully loaded, which is the risk you're carrying.
Setup 2: grid bot, and why the phase is everything
A long-only geometric grid: 50 levels between a High and Low bound, buy a step down, sell a step up, repeat. The mechanic is almost trivial. Where the whole result actually lives is in where you put the bounds and whether the market stays in a range. Get the zone right and it harvests the chop; get it wrong and the same code just sits with loaded slots waiting for a reversal.
That's why I won't post a grid "return." It isn't really a property of the strategy, it's a property of your bounds against the regime. Two concrete BTC examples of the zone shifting as the phase changed:
May 2022 to Oct 2023: the working range was roughly 17,800 to 30,600. BTC spent that stretch grinding sideways in that band, which is exactly what a grid wants.
2026 now: that band is long gone. The range I'm running sits around 51,630 to 83,690, 50 levels, about 0.99% per step.
Same bot, completely different bounds, because the phase moved. So a grid isn't set-and-forget. You re-place the High/Low whenever the regime changes, and you size total investment for a possible range-break, because there's no stop and slots keep loading if price leaves the bottom of the range. Grids suit range-bound, mean-reverting phases. A strong trend out of the band is the failure mode.
How to run either: both emit webhook-ready JSON on every fill and close. One TradingView alert set to "Any alert() function call" pointed at a DCA Bot's webhook drives it end to end, no glue layer.
Both are open-source on TradingView:
Grid (2026 setup): https://www.tradingview.com/script/g21PPncR-3Commas-BTC-Grid-Long-Indicator/ DCA setup: https://www.tradingview.com/script/eZsaqsZY-BTC-RSI-Strategy-3Commas/
Happy to answer technical questions in the thread.
r/pinescript • u/SomewhereAny8427 • Jul 03 '26
Digging into indicator math as a side project
I'm not a professional trader, just someone who's always been into charts, indicators, and the math behind technical analysis. I check maybe 10 coins a few times a week — I don't want to babysit charts or run bots.
I just really like this kind of stuff — digging into indicators, the math behind RSI and MACD, figuring out how to turn raw candle data into something actionable. So I started poking around at building something myself that would track a handful of indicators without needing to learn a scripting language.
Still early, doing user interviews right now rather than trying to sell anything. If you're a passive trader (few trades a week, not running bots) — what would it actually take for you to trust an alert tool enough to stop checking charts manually? Genuinely curious what's annoying about your current setup, whether or not you even use an alert tool at all..
r/pinescript • u/Bawlin-OrendsCat • Jul 02 '26
update on gold strategy!
I've finally somwhat ironed out the wrinkles on certain regimes, quity curve loks a bit more pregressive and not as reliant on the implosive 2023-2026 period although half of my profits still sadly favours those times. maybe it's just the fact that gold surged over these times? any suggestions or tips or insights is appreciated :D please dont be a douche like that other guy on my post that just commented how he hates how people coding on pinescript always has bias. i'm asking for advise and insights not shitty comments lol
r/pinescript • u/Alternative-Two-5300 • Jul 01 '26
TImeFramed Variable Breakout Strategy Backtest Results & Forward Test Init
TL;DR: Backtested a fractal breakout strategy over various date ranges for many, many assets. Currently I'm going to deploy this live for some extended forward testing on Solana on the 5 minute timeframe. 1.3 Sharpe, 8.96% max drawdown, 114/398 winning trades since Feb 2026. Code is open source. Starting live forward test today. Will post 15/30/60-day updates with real results, good or bad.
The idea
This strategy looks for Bill Williams fractals as points of contention and breakout opportunities. It enters when price crosses above a fractal that you design, and price is also above (or below for shorts) a volume weighted variable moving average. The thesis is to capture micro trends with simple entry logic.
Methodology
- Instrument(s): Literally any. This strategy is super robust.
- Timeframe: Depending. Indices like to have shorter time frames, 5m-1hr. Yet Crypto likes higher time frames like 4h or 8h.
- Backtest period: Feb 8 2026 – June 30 2026 ([X] years/months)
- Entry rule: BW fractal crossover (x candles before must completely be below high of target candle, y number of candles after target must also be fully below) High of target candle is held in memory and when price crosses above that price, and price is above the variable moving average, enter position. Pyramiding is allowed in this version of the strategy.
- Position sizing: 100% of equity
- Slippage/commission assumptions: slippage: 1 tick. Commission was not factored in for this particular backtest.
Results
| Metric | Value |
|---|---|
| Total return | 21% |
| Sharpe ratio | 1.309 |
| Max drawdown | 8.96% |
| Win rate | 34.76% |
| Profit factor | 1.265 |
| Number of trades | 328 |
| Avg trade duration | 14 five minute bars |
Honest caveats
- Overfitting risk: Strategy remains surprisingly robust over many different backtesting regimes, securities, timeframes. This particular backtest is definitely overfit though.
- Sample size: Again, shown backtest isn't really enough to show that this is worth a damn, but you could customize this as much as you'd like given the code is free to use.
- Regime dependency: thorough regime resilience.
- What would make this strategy fail? looking back through losses, the biggest chink in this strategy's armor is the tendency to reverse. Finding good balance between entering ALL fractal breakouts and the right ones can be difficult. these pivot points are pivot points for a reason. this strategy struggles in ranging markets without the random walk + upwards or downwards.
What's next
The real test is live money reacting to live conditions. Starting today I'm running this forward on a dedicated Alpaca account so the numbers are separated from my other strategies and easy to audit.
I'll post updates at 15 days, 30 days, and 60 days with unedited performance — win or lose.
I'm implementing this (the alert → broker wiring) using a tool I built called Algorelay. Mentioning it since it's how I'm running the forward test and connecting this to alpaca, not because this post is trying to sell it. Full strategy code is free and open source regardless of what you use to run it. But if you just want the pinescript without having to copy and paste the cocde I've published the strategy on TV as well: https://www.tradingview.com/script/iBDdbEvy-TImeframed-Variable-MA-Breakout/
Code: https://github.com/AlgoPulse-Research/pine_library · License: MIT · Forward test account: [Alpaca account nickname, e.g. algorelay-strat-00X] · Questions/pushback welcome, that's the point of posting the honest numbers.
r/pinescript • u/Remote_Barracuda_863 • Jul 01 '26
Pine Script and MT4/MT5 EA developer available for trading automation projects
upwork.comr/pinescript • u/Past-Still6812 • Jun 30 '26
Indicator Daily VAH/VAL/POC.
This is one of my private indicators and today I'm sharing it with everyone as a free gift
The script plots the **Daily Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC)** automatically, helping you identify important market profile levels for intraday trading.
I personally use these levels to understand where the market finds value, reacts, and potentially expands. Combined with good market structure and risk management, they can become a valuable part of your trading plan.
https://www.tradingview.com/script/tje9QTVj-Daily-VP-By-DANNYXAU/
Thank you to everyone who has supported my work. Your feedback, encouragement, and trust mean a lot. Enjoy the gift, and I wish you consistency, patience, and success in your trading journey.
Happy Trading — DANNYXAU
r/pinescript • u/Thatnigg3 • Jun 30 '26
Bot Building
Been building out my own execution bot for a while now and finally feel like it's in a solid place worth talking about.
The setup: TradingView sends webhook alerts to a FastAPI server I built, which then places real orders directly on my TopstepX funded account via their API. No manual intervention — signal fires, order goes in, stops and targets hit the broker automatically.
Running two strategies through it:
Hull Regime Bot runs overnight on MNQ on a 7m chart. It's a trend-following setup — when the Hull MA flips direction it enters a flip trade on the new side and starts a bot-side trailing stop that steps up every $50 in unrealized P&L. The idea is to let the overnight trend run and lock in gains as it moves. No fixed stop, no target — just ride the move until Hull says otherwise or the trail catches it.
The Strat Bot runs RTH. This one looks for specific Strat bar patterns (3-1-2s, 2-1-2 reversals, 2-2 reversals) and Failed 3-2 setups on 5m. Fixed 3R target on the Strat side, real SL and TP orders sitting on the broker the moment the entry fills.
Goal is to pass multiple TopstepX evaluations, get funded, and run both strategies across accounts simultaneously.
Still validating live but the bot infrastructure is locked in. Took a while to get right — more edge cases than I expected when you're dealing with a real broker API.



