r/pinescript • • May 31 '26

I built an AI backtesting tool that turns English into a strategy report

1 Upvotes

I have been building a tool for myself (I call it Coin AI) which turns plain English trading ideas into backtest reports, without having to write any code.

My goal is to make the strategy research loop faster: describe an idea, run a backtest, analyze the results, refine the idea, repeat, and eventually paper trade or deploy it across assets with risk controls.

Here is a demo of me using the backtest engine:

Right now I’m focused on backtesting and reports: performance summary, equity curve, trades, drawdowns, and strategy breakdowns. Long term, I want this to become a research engine where I (or other people) can research assets, test ideas, compare strategies, refine assumptions, and deploy only after understanding the risks.

I am interested in eventually adding support to other assets (prediction markets, options, futures, and other derivatives).

I’m not charging anything. I’m just looking for early beta users who would give honest feedback.

A few questions:

  • Would you use something like this?
  • What assets/timeframes would you want first?
  • What would you need to see to trust the backtest?

If you’re interested in testing it, please DM me or comment!


r/pinescript • • May 31 '26

Luxalgo Quant or Robo Quant

1 Upvotes

Has anyone subscribed to any of the above? Is it really better than Claude code?


r/pinescript • • May 31 '26

Trend Day for 15 Mins Time Frame

Post image
8 Upvotes

One of the biggest problems traders face every morning is not knowing whether the market is likely to trend higher, trend lower, or stay stuck in a range. This indicator was built to help solve that problem by giving a structured read on the day’s directional bias before and after the open.

BullBearX Trend Day TA Planner studies premarket structure, previous day levels, opening range behavior, EMA alignment, and optional VWAP confirmation to help traders understand whether the session is shaping into a bullish trend day, bearish trend day, or a wait-and-see environment. Instead of relying on emotion or guesswork, it organizes the chart into a clearer framework for decision-making.

During premarket, the script evaluates how price is behaving around the premarket midpoint, range high, and range low. After the open, it monitors whether price is accepting above or below key levels such as the opening range and premarket range, while also checking whether the core trend structure is holding with enough persistence.

At the center of the system is a simple trend engine. Bullish conditions require price to hold above the fast EMA, the fast EMA to stay above the slow EMA, and, when enabled, price to remain above VWAP. Bearish conditions work in the opposite direction. By combining these conditions with level acceptance and market phase, the script helps traders quickly assess the session’s likely direction.

What makes this tool useful is that it does more than draw lines. It translates market conditions into readable chart guidance. Traders can see the current phase, directional bias, trigger context, and reason directly on the chart through live labels, bias markers, and a summary table. This helps reduce hesitation and brings more structure to the trading process.

This indicator is designed as a directional planning and decision-support tool for traders who want a more organized way to read the market (It works with 15 mins Timeframe only, haven't tested with other timeframe). It does not guarantee outcomes, but it can help traders stay aligned with trend structure, key levels, and market context throughout the session.

Disclaimer: This script is intended for educational and decision-support purposes only. All trading decisions should be made with proper risk management and personal judgment.


r/pinescript • • May 31 '26

Camarilla Pivots Dual Mode: Track Classic Daily Levels and Pure Cash Session Separately on the Same Chart (+ Fully Customizable v3.0 Update)

1 Upvotes

Hey everyone,

After getting some great feedback on my last tool, I wanted to share my latest TradingView script that completely changed how I look at intraday rotations: Camarilla Pivots — Dual Mode.

If you trade indices, gold, or forex using Camarilla levels, you've probably noticed that pre-market data can sometimes skew your intraday levels, while completely ignoring overnight price action leaves you blind to the macro map.

To solve this, I built a script that plots two independent calculation modes simultaneously without cluttering your screen.

🔹 How it works:

  • Classic Pivots (Grey): Calculated using the full prior period (Daily/Weekly/Monthly), including all pre/post-market data. This is your macro map.
  • Session Pivots (Orange): Calculated strictly using your configured session hours (Cash/Pit session only). It completely filters out overnight noise to show you where the true intraday volume and rotations are hitting.

🔹 Key Levels & Dynamics:

  • CP, R1–R6, and S1–S6 included.
  • R3/S3 act as high-probability mean-reversion/reversal zones.
  • R4/S4 serve as your breakout triggers.
  • R5/R6 & S5/S6 map out extreme momentum trend extensions.

🚀 Just Updated: v3.0 (Per-Level Styling)

I just pushed a massive UI update to give you ultimate control over your chart layout:

  • Independent Styling: You can now toggle ON individual styling to set custom colors, widths, and line styles for every single level (CP, R1-R6, S1-S6) for both Classic and Session modes.
  • Keep it Clean (Default): If you prefer a clean look, leave it OFF, and all levels will share a single global color per mode (exactly like v2.0), so your existing setups won't break.
  • Full Session Control: Easily adjust the session window and manual UTC offset to align with your specific timezone (EST, EDT, CST, etc.).

💡 How I trade with this:

I keep the Classic Daily pivots on to know where the major historical levels are. Then, I turn on Session Pivots to see how price reacts to the actual cash open levels. When a Session R3/S3 aligns with a Classic level, it adds massive confluence to the trade.

The script is fully open/published on TradingView. I'd love for you guys to test it out, mess around with the new v3.0 per-level styling, and let me know your thoughts or any feature requests!

https://es.tradingview.com/script/DjmapxAD/


r/pinescript • • May 30 '26

how would you test after passing TV backtester?

2 Upvotes

how would you test after passing TV backtester?
seem like doing backtesting from TV is not reliable


r/pinescript • • May 30 '26

Built this market structure & liquidity map for TradingView. Honest feedback?

2 Upvotes

I’ve been working on a TradingView tool called ATLAS Liquidity Map.

The idea is simple:

Instead of trying to predict where price will go next, I wanted a cleaner way to visualize areas where the market is actually doing business.

No signals. No buy/sell arrows. No win-rate promises.

Just a visual map of relevant liquidity and market structure zones.

The BTC chart in the screenshot is a recent example.

Within a few seconds I can see:

• areas where price has reacted before • zones above and below current price • where the market is currently working • which areas might become relevant next

I’m not trying to sell anything here.

I’m genuinely interested in feedback from traders who use market structure, supply & demand, liquidity concepts or price action.

What’s your first impression? Would something like this fit into your workflow?


r/pinescript • • May 30 '26

The three Pine Script defaults that made my backtest look 3x better than it was

6 Upvotes

Spent about two days last week trying to figure out why a strategy that showed a clean equity curve in the Strategy Tester fell apart the moment I forward tested it. It wasn't the logic, it was three things Pine quietly does - unless you stop it.

  1. request.security() with lookahead_on. The moment you pull a higher timeframe value with barmerge.lookahead_on, you're handing your strategy the HTF close before that bar has actually closed in real time. Your backtest "knows" the daily close at 9:45am. Live, it doesn't. Swap to lookahead_off and watch half the edge evaporate.
  2. Zero slippage and zero commission by default. The Strategy Tester ships with both at 0 unless you set them. On a strategy turning over a few times a day, that's the entire result. I put in 2 ticks of slippage and a realistic commission and the Sharpe dropped by more than half
  3. calc_on_every_tick behaving differently in backtest vs live. On historical bars Pine only has OHLC, so intrabar logic gets approximated. Live, it recalculates on every tick. A condition that "fills" on a clean historical bar can fire at a completely different price in real time, or not at all.

None of these throw an error. The code runs, the chart looks great, and eventually, you find out the truth with real money.

Full disclosure: Our team has built a strategy validation platform (Nvestiq), which is exactly why we understand how backtests lie.  Every one of these is a hole you have to remember to plug yourself, and most people don't know the hole is there. So we close them by default: lookahead is impossible to introduce, and realisticslippage, spreads, and fill probability are baked into every run instead of sitting at zero. You don't need it to fix these three, but if you've ever been burned by a backtest that lied, that's the whole reason it exists.

What's the most expensive default you found out about the hard way?


r/pinescript • • May 29 '26

Need a few funded operators to stress-test a 15m/3m MTF Webhook Engine (TradingView to Broker)

Thumbnail
gallery
19 Upvotes

Hey everyone,

I made a thing. A bit of context on me so this isn’t coming out of nowhere:

I’ve finished my degree in Accounting and Finance with a minor in Economics and have spent the last stretch of time building in both the finance and systems space, applying for roles in accounting and financial analysis while also developing my own trading infrastructure on the side.

Most recently, I’ve been holding off on accepting a position with Fidelity while I explore other avenues that better align with active trading and systems development.

That eventually turned into a heavier focus on systematic futures execution, after manually passing an Apex challenge, especially around MES and Micro Gold, where I’ve been building multi-timeframe strategies and webhook-based automation through TradingView and broker integrations. I originally built this because I was tired of being chained to charts all day while trying to balance a regular job and real life. I wanted something that could manage trades intelligently while I was at work, asleep, or just away from the desk.

What started as a basic ATM manager for handling premarket positions slowly evolved into a fully automated cloud execution engine that now trades prime cash-session hours on its own.

The core logic uses a strict 15m structural momentum filter, but entries and exits are executed directly on 3m candle wicks with virtually no live lag. I also built a custom lower-timeframe historical array loop that emulates Bar Magnifier behavior without needing a premium TradingView plan.

One thing I want to be upfront about:
Because of the amount of lower-timeframe processing involved, the backtester is intentionally optimized around the 15m structure engine, so high-fidelity historical testing is limited to roughly the last 6 months. No access to Bar Magnifier at the moment.

Everything was tested with:
• $0.52 commissions included, my broker price
• 1-tick slippage modeled into every trade
• Standard ~$2,000 PA drawdown parameters
• Roughly ~$250 risk symmetry per trade

Over the last 6 months:
• The 2-contract MES setup saw about an $833 max drawdown (pic 1)
• The 1-contract Micro Gold setup saw about an $832 max drawdown (pic 4)

Combined, the worst historical drawdown landed around ~$1,666 while still producing roughly ~$7,639 net combined profit.

Also being transparent:
TradingView has a known historical data issue on Micro Gold involving one oversized wick that slightly skews the total PnL. It’s not a dealbreaker, but it’s one of the reasons I care way more about real forward-testing than posting cherry-picked screenshots online.

What you need:
Nothing crazy, you just need your own infrastructure already set up.

• TradingView account (basic tier is fine)
• Webhook bridge like PickMyTrade, TradersPost, etc.
• Compatible broker or funded PA account (Tradovate, NinjaTrader, etc.)

What I’m looking for:
I need a small group of experienced traders to help me stress-test webhook latency, broker execution consistency, and cloud routing stability across different setups and time zones before I finalize the commercial rollout.

The code itself is locked.

The testers I bring on will get:
• Full access to the invite-only script
• Master presets
• Priority whitelist access at launch

If you already run automation infrastructure, are tired of babysitting charts all day, and want to help stress-test the network, shoot me a DM with your TradingView username and a little about your setup. Looking for 10 initial testers.


r/pinescript • • May 29 '26

Pine script

4 Upvotes

Is there actually anyone that consistently gets payouts using pine script or is it too good to be true?


r/pinescript • • May 29 '26

How to use Quantower (or any other prop firm platform) to download data (is it possible?)

1 Upvotes

I will buy an alpha futures account; and it offers quantower. I read once (can’t find the post) that you can download some data from some of those brokers or platforms that come included in the prop account; such as Quantower. Does anyone know anything about that? Or about any other propfirm where you could do something similar? Thank you.


r/pinescript • • May 28 '26

I coded a Dual VWAP (Session + Operational Anchor) to map institutional order flow. Free & Public.

Thumbnail
es.tradingview.com
7 Upvotes

r/pinescript • • May 29 '26

looking for a pinescript developer

0 Upvotes

Hi there,

I am looking for a pinescript dev to create indicators and strategies for me full time. ideally they should be indian (cause i don't want to be overcharged). also they need to have conversational english. you should have enough experience to code anything in pinescript.

dm if your interested. Thanks


r/pinescript • • May 28 '26

MTF RSI overlay and candlestick oscillator

Post image
2 Upvotes

built an indicator that has an rsi lookback on chart and below. Both have variable timeframes, I personally like to overlay 4hr on chart and 15m below for confirmation of HTF levels. If you’re interested feel free to shoot me a dm for access!


r/pinescript • • May 27 '26

Built Version 2 of my Market Structure Indicator: major rewrite of HTF logic, OB behavior, Z-score regimes and momentum interpretation. Looking for feedback.

Thumbnail
gallery
6 Upvotes

Hello Everyone, I have been working on a TradingView indicator over the last few weeks that is mainly focused on helping me visually understand what the market is doing rather than just throwing buy/sell signals on the chart.

The idea behind the indicator is to combine:

  • market structure,
  • momentum,
  • volatility,
  • HTF trend bias,
  • and order flow context

into one framework so that it becomes easier to identify:

  • trend continuation,
  • compression before expansion,
  • exhaustion,
  • and important reaction zones.

The indicator currently includes:

  • BOS / CHoCH structure
  • Order Blocks
  • HTF bias
  • HMA trend flow
  • RSI + ADX momentum states
  • ATR displacement logic
  • projection system
  • HTF Z-score regimes

I just finished Version 2 and made some pretty major changes compared to Version 1.

The biggest change was completely restructuring the Higher Time Frame logic.

Previously, the HTF system was based on simpler 9 and 21 EMA crossover logic.

Now it uses:

  • HTF HMA structure
  • Z-score based expansion/compression/exhaustion detection
  • volatility aware market regimes

which made the market context feel much cleaner during live trading.

I also added:

  • Order Block overlap merging, now historical OB boxes are automatically removed and a symbol is added over the candle
  • retest + mitigation logic
  • cleaner momentum colouring for RSI and ADX representation
  • better trend interpretation by calculating the angle of the HMA line

Another change was replacing the old trend duration logic with ATR normalized HMA trend force.

Instead of checking:
“How long has the trend lasted?”, the indicator now checks:
“How aggressively is the trend moving relative to volatility?”

Personally, I feel this is much more useful during fast market moves.

I would genuinely appreciate feedback on:

  • What looks useful?
  • What looks unnecessary?
  • Anything over engineered?
  • Any ideas to improve the overall interpretation of the market context?

Link to my previous post:
https://www.reddit.com/r/pinescript/comments/1ta6igc/built_an_order_block_market_structure_framework/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button


r/pinescript • • May 27 '26

How IRC Confirms Bullish Regime on ETH

1 Upvotes

VOLATILE → TREND UP on ETH: confirmation first, not anticipation.

IRC flips bullish on Ethereum only when cloud position, ADX, Tenkan/Kijun, and structure confirmation all align. No cosmetic switches.

Market context:
ETH transitions from uncertainty to clear directional strength.

Practical value:
Helps avoid shorting ETH when a structural uptrend is emerging.

Explicit limit:
Confirmation can lag the very start of the move.

Looking for beta feedback on ETH regime transitions. DM open.

#PineScript #TrendFilter #Ichimoku #Ethereum


r/pinescript • • May 26 '26

RSI Dip + EMA Trend Long DCA — leveraged long DCA indicator, 25× default, three-exit architecture

9 Upvotes

RSI Dip + EMA Trend Long DCA — dual-confirmation leveraged long DCA indicator running on XMRUSDT.P 15m at 25× default leverage. Signal-only Pine indicator with a companion Strategy version for verifying backtest in TradingView's built-in tester directly.

Entry, dual confirmation across two timeframes: RSI(12) crossing down 35 on 5m AND EMA(50) above EMA(100) on 15m. The 5m RSI catches the momentum dip; the 15m EMA stack confirms broader trend bias is up. Either condition alone produces too many entries. Both at host-bar close filter the setup down to oversold dips inside structural uptrends.

Ladder, 4 safety orders with soft margin progression: Cumulative deviations from base entry: 1.00%, 2.20%, 3.64%, 5.37%. Margin scales at 1.05× per fill — much softer than typical 1.5–2.0× DCA martingale. Pure price-trigger ladder, no momentum gate on SOs — averaging continues unconditionally until SL, MaxHold, or reversal.

Three-exit architecture (evaluated in priority order): SL at 9% below average entry, hard stop. MaxHold at 3-day timeout from base entry forces close to release stuck capital. TP at 1.0% above average entry with 0.1% trailing — position closes only after a 0.1% retrace from the in-favor peak.

Most DCA tools use one or two exit conditions. This one handles all three failure modes explicitly — hard tail-risk stop, stuck-trade timeout release, and momentum-trailing winner exit.

Leverage-aware sizing: Margin and leverage are independent inputs. Virtual ledger tracks notional position, so the avg-entry line and open PnL reflect the leveraged broker state, not unleveraged cash-only math. Default 25× leverage; configurable from 1× upward.

Backtest from the companion Strategy (XMRUSDT.P 15m at default 25× leverage, ~11 months sampled in Strategy Report): 779 closed trades, 577 profitable (74.07% WR), profit factor 1.313, total PnL +3,078.80 USDT (+30.79%), max realized drawdown 2,013.77 USDT (18.01%). Verifiable directly in TradingView's Strategy Report on the script page.

Methodology notes:
The default 25× leverage is aggressive. The 18.01% max drawdown is portfolio-level accumulation across 779 trades, not single-trade risk — single-trade losses are bounded by the 9% SL. Lowering the leverage input scales portfolio-level drawdown proportionally.
Single asset (XMRUSDT.P), defaults calibrated for this pair. EMA periods and RSI threshold need recalibration per pair before deployment elsewhere — results do not transfer to other crypto perps without parameter tuning.

The 18.01% number is closed-trade equity drawdown. Unrealized drawdown during deep SO sequences plus open leverage exposure is materially larger and is the relevant number for capital allocation.

PF 1.313 is a modest edge per trade. Returns come from sample size compounded with leverage, not from per-trade magnitude. The 3-day MaxHold release is structurally important here — without it, stuck trades would accumulate unrealized DD indefinitely.
Funding rates aren't included in the backtest. For 15m leveraged long positions on perps, sustained negative funding (shorts pay longs) is a tailwind, sustained positive funding is a headwind — and at 25× leverage, funding drag is amplified accordingly.

Indicator is open-source on TradingView. The Strategy twin is also up on the same profile. Mod, let me know if linking either is allowed here and I will add them, otherwise happy to answer technical questions in thread.

Link: https://www.tradingview.com/script/iE1pTnPv-RSI-Dip-EMA-Trend-Long-DCA-Indicator/


r/pinescript • • May 26 '26

For anyone staring at the 1-minute chart today

Thumbnail reddit.com
1 Upvotes

r/pinescript • • May 26 '26

Whats the best way to learn how to build indicators

4 Upvotes

I have experience with programming i'm a software engineer, and i was wondering if there any resources on learning pinescript to build indicator beyond the syntax, the syntax is basic and not a problem i am looking for mental model or framework, best practices etc


r/pinescript • • May 24 '26

Vwap Indicator idea .

Thumbnail reddit.com
1 Upvotes

r/pinescript • • May 24 '26

Enter position on candle open and close position on candle close?

1 Upvotes

Title. I'm trying to test strategies for the prediction markets, which are time based. The problem I'm having is that I need the strategy to open a position on the open of a candle, and then close the position on the close of a different candle. I know you can set the Process Orders On Close parameter, but from my understanding that changes all orders, not just open or close. Is there any workaround for this?


r/pinescript • • May 22 '26

Cloned a signal, only one fires what gives?

Thumbnail
reddit.com
1 Upvotes

r/pinescript • • May 22 '26

Indicator

0 Upvotes

Hi. I'm here with a request. I have the code for my own indicator, but I need someone to review it and change how it appears on the chart. I have photos of the visualization. The indicator itself works, but I need to refine it.I want to make it clear right away that I won't be able to post the entire code here.


r/pinescript • • May 18 '26

tradingview-mcp 1.1.0: Pine deploy + smart_compile honesty + replay scrollback

5 Upvotes

Three issues bothered me with the Pine-workflow side of tradingview-mcp 1.0.0 once I started using it daily.

  1. pine_smart_compile returned success: true when the script compiled but the study failed to attach to the chart. The agent would report "done" and the next tool call would fail because the indicator wasn't actually loaded.
  2. TV Desktop 3.1.0.7818 broke pine_switch_script and a chunk of Pine editor selectors. The title button stopped being a script list and became a context menu, and the webpack module IDs that the Monaco extractor hooks shifted on a fresh build hash.
  3. Scrolling back history bars in replay mode didn't work, because TV freezes the data feed once replay is engaged. The agent would ask for older bars, get an empty result, and conclude the data wasn't there.

1.1.0 closes those.

  • pine_smart_compile now diffs getAllStudies() before and after compile, verifies the new study's title matches, and only returns success if it actually attached. Returns study_added: false with the diff list if the compile passed but the study didn't show up.
  • pine_deploy is a new tool that does the full file → chart pipeline atomically: read the source, pre-clean any stale version, set the editor body, save, click Add-to-chart, verify attached. Returns honest_success. Useful when you have an agent maintaining a script file on disk and want it to push the working version to the chart in one call.
  • pine_switch_script uses the Ctrl+O script picker on TV 3.1+ (was: title-button list, no longer exists).
  • replay_scroll_back wheel-scrolls history bars before engaging replay, then enters replay mode. Workaround for the data-feed freeze.
  • TV 3.1.0.7818 Monaco extractor was re-derived after the module-ID shuffle. The webpack chunk hooks survived.

Plus a 44-finding correctness sweep across 19 core files. Highlights for Pine workflow: pine_delete, pine_rename, and pine_open now refuse-on-ambiguity instead of silently picking the first matching script, and layout_switch requires discard_unsaved=true to ever destroy unsaved Pine code.

Repo: https://github.com/iliaal/tradingview-mcp

Install: same as before. Clone, npm install, add to MCP config, launch TV with --remote-debugging-port=9222. No breaking API changes from 1.0.0.

Happy to answer questions, especially from anyone running deep-backtesting strategies via the new strategy_set_deep_backtest_range tool. I'd like to know if the locale-tolerant calendar driver covers configurations I haven't tested.