1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Price Deviated by 2 MAs {Morindok} v5 calculates a spread based on their difference multiplied by a user-defined multiplier and applies this spread to the open, high, low, and close prices to create deviated candles. These deviated candles are plotted in teal or maroon colors indicating upward or downward moves. Input settings allow customization of the moving average type (SMA or EMA), multiplier, time-based filters for sessions, and search parameters for finding specific time ranges within a maximum number of bars. The main settings change the deviation level and the time window for analysis. It draws on the price chart.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ÔÑæÚ ÈÇÒå (ÇäÊÎÇÈ Ñæí ÇÑÊ)
time
0
startTime
ÇíÇä ÈÇÒå (ÇäÊÎÇÈ Ñæí ÇÑÊ)
time
0
endTime
äæÚ ãíÇäíä
string
EMA
maType
ÖÑíÈ ÇäÍÑÇÝ (Multiplier)
float
1.0
mult
ÝÚÇáÓÇÒí ÌÓÊÌæí ÒãÇä Çæá (Èå ÚÞÈ)
bool
true
enableSearch1
ÝÚÇáÓÇÒí ÌÓÊÌæí ÒãÇä Ïæã (Èå Ìáæ)
bool
true
enableSearch2
ÍÏǘËÑ ÓÊÑÔ ÌÓÊÌæ (˜äÏá)
int
500
maxSearchBars
ÍÓÇÓíÊ ÌÏÇíí (?=˜Çãá)
float
1.0
gapRatio
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.
Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a
This educational script demonstrates custom candlestick rendering on the price chart using the plotcandle function. It calculates a 20-period Simple Moving Average and checks if the bar's low price remains strictly above it. When the condition is met, the indi
This indicator identifies candlestick patterns on the price chart by combining price action with momentum factors and trend filters. It calculates one of four selectable oscillators: Karobein Oscillator, Money Flow Index, RSI, or Stochastic, alongside trend ru
This indicator draws smoothed candlesticks on the price chart. It applies a simple moving average of a user-set length, defaulting to nine, separately to open, high, low, and close, then plots those four values with plotcandle. Wick color is green when the raw
Major Buy Setup plots a 20-period and a 50-period simple moving average on the price chart. It marks a buy when the current bar is both a bullish engulfing candle and a bald bull candle, defined as a green candle whose upper shadow is no more than five percent
30 min Pivot is an overlay indicator that plots an exponential moving average (EMA) calculated from a specified timeframe (default 30 minutes) and flags specific multi-bar candle setups. It checks the relative distance between price and the higher-timeframe EM