1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
86 lines of Pine Script v5 from pine/SellOnlyStrategy.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Sell-Only Strategy triggers short entries when the open RSI exceeds 70 and momentum turns downward alongside a bearish engulfing bar. Exits are managed through a fixed percentage take profit and stop loss, as well as an optional fast midpoint exit mechanism that activates within a specified bar grace window after entry. It plots directly on the main price chart and only executes short positions.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Fast midpoint exit (original logic)
bool
true
useFastExit
Use fixed Take Profit / Stop Loss
bool
true
useTPSL
Take Profit %
float
1.0
tpPerc
Stop Loss %
float
1.0
slPerc
Fast-exit armed from bar
int
3
graceFrom
Fast-exit armed until bar
int
7
graceTo
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Improvising [Alorse] is a price-chart strategy that looks for a one-bar candle reversal filtered by a 10-period EMA, a 14-period RSI, and a rising or falling MACD. Longs require a bearish bar followed by a bullish close above the EMA, RSI below 65, and a risin
Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish
This strategy enters long on an outside bar when the candle is bullish, the Klinger Volume Oscillator is positive, and price is above a Hull moving average. It enters short on an inside bar when the candle is bearish, the oscillator is negative, and price is b
This Pine Script strategy identifies classic bullish engulfing candlestick patterns to open long positions, deploying 100 percent of equity. It calculates a short-term Relative Strength Index to determine exits, closing open long positions when the RSI exceeds
This strategy combines Ichimoku Kinko Hyo components, a Stochastic oscillator, and specific candlestick patterns to generate trade signals. It identifies Kumo twists and range breakouts while evaluating candle body shapes using Fibonacci threshold filters. Tra
This strategy combines candlestick price action with Exponential Moving Average, RSI, and MACD filters to identify short-term trend trades. A long signal occurs when a bullish candle engulfs the previous open while price remains above the EMA, RSI stays below