When it signals
The strategy submits a long entry when `RSI(14)` is above 50. Its short condition is permanently false, so it does not sell short.
A long-only Pine Script v6 strategy that enters above RSI 50 and manages positions with ATR-based stops and targets.
How it works
When it signals
The strategy submits a long entry when `RSI(14)` is above 50. Its short condition is permanently false, so it does not sell short.
How positions are managed
While a long position is open, it places a stop at 1.5 × `ATR(14)` below average entry and a limit target at 3 × `ATR(14)` above average entry.
How risk is framed
The configured target distance is twice the configured stop distance, based on ATR multiples rather than a fixed percentage. The strategy also models a 0.1% commission in TradingView.
Walkthrough
Live market chart
Backtest evidence
E0 · Reconstructed reference
algonexta-reference · Yahoo Finance · EURUSD · 1h
Net profit
0.0161
Max drawdown
0.0078
Trades
29
Symbol · TF
EURUSD · 1h
Equity curve
| Time | Side | Price |
|---|---|---|
| Jun 11, 12:00 PM | long | 1.15433 |
| Jun 11, 01:00 PM | exit | 1.15253 |
| Jun 11, 05:00 PM | long | 1.15553 |
| Jun 14, 11:00 PM | exit | 1.15915 |
| Jun 16, 07:00 AM | long | 1.15982 |
| Jun 17, 04:00 AM | exit | 1.16166 |
| Jun 19, 12:00 PM | long | 1.14745 |
| Jun 22, 03:00 AM | exit | 1.14612 |
| Jun 25, 02:00 AM | long | 1.13662 |
| Jun 25, 07:00 AM | exit | 1.13520 |
| Jun 25, 08:00 AM | long | 1.13701 |
| Jun 25, 10:00 AM | exit | 1.13535 |
| Jun 25, 01:00 PM | long | 1.13649 |
| Jun 26, 08:00 AM | exit | 1.13996 |
| Jun 26, 06:00 PM | long | 1.13908 |
| Jun 29, 02:00 PM | exit | 1.14239 |
| Jun 30, 02:00 PM | long | 1.14364 |
| Jun 30, 04:00 PM | exit | 1.14157 |
| Jul 2, 06:00 AM | long | 1.13986 |
| Jul 2, 12:00 PM | exit | 1.14563 |
| Jul 6, 04:00 PM | long | 1.14338 |
| Jul 7, 07:00 PM | exit | 1.14201 |
| Jul 8, 05:00 AM | long | 1.14233 |
| Jul 8, 09:00 AM | exit | 1.14072 |
| Jul 8, 04:00 PM | long | 1.14168 |
| Jul 9, 06:00 AM | exit | 1.14433 |
| Jul 9, 11:00 AM | long | 1.14325 |
| Jul 10, 02:00 AM | exit | 1.14590 |
| Jul 10, 03:00 PM | long | 1.14416 |
| Jul 10, 05:00 PM | exit | 1.14255 |
| Jul 13, 07:00 AM | long | 1.14273 |
| Jul 13, 02:00 PM | exit | 1.14082 |
| Jul 14, 08:00 AM | long | 1.14038 |
| Jul 14, 12:00 PM | exit | 1.14519 |
| Jul 15, 08:00 AM | long | 1.14273 |
| Jul 15, 11:00 AM | exit | 1.14143 |
| Jul 17, 06:00 AM | long | 1.14534 |
| Jul 17, 08:00 AM | exit | 1.14418 |
| Jul 17, 07:00 PM | long | 1.14443 |
| Jul 19, 11:00 PM | exit | 1.14316 |
| Jul 20, 02:00 AM | long | 1.14443 |
| Jul 20, 09:00 AM | exit | 1.14323 |
| Jul 21, 06:00 AM | long | 1.14260 |
| Jul 21, 01:00 PM | exit | 1.14162 |
| Jul 22, 05:00 AM | long | 1.14129 |
| Jul 23, 02:00 AM | exit | 1.14309 |
| Jul 24, 07:00 AM | long | 1.13934 |
| Jul 24, 11:00 AM | exit | 1.13799 |
| Jul 26, 11:00 PM | long | 1.13986 |
| Jul 27, 12:00 PM | exit | 1.13846 |
| Jul 28, 02:00 PM | long | 1.13895 |
| Jul 29, 06:00 PM | exit | 1.14361 |
| Jul 31, 02:00 PM | long | 1.15088 |
| Aug 4, 06:00 PM | exit | 1.15364 |
| Aug 6, 11:00 AM | long | 1.15487 |
| Aug 6, 02:00 PM | exit | 1.15373 |
| Aug 7, 11:00 AM | long | 1.15367 |
| Aug 7, 12:00 PM | exit | 1.15704 |
⚠Executed from the versioned AlgoNexta IR on the same OHLC dataset used by the chart.
⚠This is an independent reference backtest; TradingView Strategy Tester remains the official comparison.
⚠This is an AI-reconstructed approximation of the script’s logic, not an execution of the exact source — verify the real script in TradingView Strategy Tester.
Vision Grade
Vision Grade requires a reference backtest with enough reconstructed entries to measure — not available for this script yet.
Full breakdown
Published by AlgoNexta, an evidence-first platform for building, reviewing, and documenting algorithmic trading tools. This page explains the script's actual logic and intended use; it does not promise profitability or replace verification in TradingView.
This is a long-only TradingView strategy built around the 14-period RSI. It opens a long position when ta.rsi(close, 14) > 50; the short condition is explicitly set to false, so it never opens short trades.
Once a long position exists, the strategy calculates a 14-period ATR and places a dynamic stop 1.5 ATR below the average entry price. Its profit target is 3 ATR above the average entry price, which is a 2:1 target-to-risk distance at entry.
RSI(14) > 50.shortCondition = false.strategy.position_avg_price - ATR(14) × 1.5.strategy.position_avg_price + ATR(14) × 3.0, so the strategy is not designed to stack multiple same-direction entries.commission_value=0.1 percent in its Strategy Tester configuration.Because this is a strategy, TradingView shows its native entry and exit markers on the price chart and records trades in the Strategy Tester. There are no custom lines, colored candles, labels, dashboard panels, or alert conditions coded in this version.
A long marker represents an RSI-above-50 entry. Exit markers represent either the ATR-based stop or the ATR-based limit target being reached. The stop and target are recalculated from the position's average entry price using the current ATR(14) value.
The code does not specify a market, session, or preferred timeframe. It can be applied to any TradingView symbol and chart interval that has sufficient price history for RSI and ATR calculations. Test each market and timeframe independently, since ATR distances and RSI behavior vary with volatility and bar size.
RSI(14) is above 50.alertcondition() calls are included, so the script does not define custom indicator alerts.request.security() data or future-looking references. However, strategy fills and results should be checked in TradingView's Strategy Tester; process_orders_on_close=false means orders are not configured to process on the signal bar's close.This script is for analysis and testing, not financial advice. Use TradingView Strategy Tester and forward testing as the source of truth for results on your chosen symbol and timeframe.
Source
// ============================================================================
// © algonexta
// This script is for education and research; it does not guarantee results.
// Verify this source in TradingView before use.
// ============================================================================
//@version=6
strategy("This Pine Script code is subject to the terms of the Mozilla Public License", overlay=true, pyramiding=0, commission_type=strategy.commission.percent, commission_value=0.1, process_orders_on_close=false)
// Generated with AlgoNexta Pine Studio
// https://algonexta.com
// Pine Script v6 — verify in TradingView before use.
// Generated deterministically from approved AlgoNexta strategy IR.
longCondition = ta.rsi(close, 14) > 50
shortCondition = false
if longCondition
strategy.entry("Long", strategy.long)
if shortCondition
strategy.entry("Short", strategy.short)
atrStop = ta.atr(14)
longStop = strategy.position_avg_price - atrStop * 1.5
shortStop = strategy.position_avg_price + atrStop * 1.5
if strategy.position_size > 0
strategy.exit("Long Exit", "Long", stop=longStop, limit=strategy.position_avg_price + atrStop * 3)
if strategy.position_size < 0
strategy.exit("Short Exit", "Short", stop=shortStop, limit=strategy.position_avg_price - atrStop * 3)
// Generation: AlgoNexta compiler-v17 · 8bde37036ea9FAQ
The strategy enters long when the 14-period RSI is above 50: `ta.rsi(close, 14) > 50`. It has no additional trend, volume, or price-pattern confirmation.
No. The code sets `shortCondition = false`, so no short entries can be generated.
For long positions, the stop is 1.5 times `ATR(14)` below the average entry price and the limit target is 3 times `ATR(14)` above it. This creates a 2:1 target-to-risk distance based on those ATR multiples.
The code contains no higher-timeframe requests, lookahead settings, or future-bar references. Still, review fills in Strategy Tester because the strategy is configured with `process_orders_on_close=false`, and live execution can differ from historical assumptions.
It is a TradingView strategy and uses `strategy.entry()` and `strategy.exit()` for simulated Strategy Tester orders. It does not include `alertcondition()` calls or custom alert logic.
No. This script is not financial advice; TradingView Strategy Tester, plus forward testing on the intended market and timeframe, is the source of truth for its simulated and live results.
Describe the change in plain English and AlgoNexta rebuilds it as a fresh Pine v6 script — with its own explanation, evidence, and walkthrough.
Build your own versionEducational content only — not financial advice. TradingView is the source of truth for live data, compilation, and Strategy Tester results.