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
34 lines of Pine Script v5 from Bull Trend Filtered StochRSI (BTFS).pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.
A bullish trend state is identified when close prices trade above the EMA filter level. The strategy enters a long position when the Stochastic RSI K line exceeds the defined lower band during a bullish trend filter. Positions are exited when the K line crosses under the lower band threshold. The strategy features customizable band and moving average inputs and operates without a default stop loss.
Stochastic RSI oscillator with customizable K and D parameters
Highest high EMA filter for trend identification
Background color highlights during active bullish trend
Crossunder exit logic based on lower band threshold
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
filter_ema_len
int
6
filter_ema_len
ema_donchian_len
int
30
ema_donchian_len
K
int
7
smoothK
D
int
4
smoothD
RSI Length
int
14
lengthRSI
Stochastic Length
int
14
lengthStoch
RSI Source
source
close
src
lowerband
int
35
lowerband
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.
MACD + Divergences [Alorse] is a momentum strategy that calculates the MACD oscillator and identifies regular and hidden divergences using pivot high and low points. It filters trade signals with dual Exponential Moving Averages (EMA 150 and 600) to ensure tra
This strategy calculates the Moving Average Convergence Divergence indicator and plots the MACD line, signal line, and histogram in a separate pane. It enters long positions when the MACD line crosses above the signal line and enters short positions when it cr
This strategy combines an EMA ribbon with MACD confirmation and plots in a separate pane. It enters when ribbon alignment, optional MACD zero or signal crosses, volume, smart-money, and multi-timeframe filters agree, then exits with percentage stop loss and ta
This strategy evaluates the dynamic relationship between price and a chosen moving average across six diagnostic dimensions: trend, respect, extension, compression, acceleration, and exhaustion. It plots a normalized relationship oscillator bounded between -10
This strategy combines the Moving Average Convergence Divergence oscillator with an Exponential Moving Average trend filter. It enters long positions when the MACD histogram crosses above zero while price stays above the long-term EMA filter. Long trades close
This strategy evaluates EMA momentum crossovers filtered by an RSI oscillator. It enters a long position when a fast EMA crosses above a slow EMA while RSI remains above 40. Conversely, it enters a short position when the fast EMA crosses below the slow EMA wh