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
Filters include a moving average, a confirmation moving average, a higher-high higher-low market structure check using pivots and a MACD direction check. Take profit and stop loss percentages can adapt to ATR. A Kelly-style position size is estimated from win rate and average win and loss inputs, scaled by a safety factor and capped. Labels are in Russian, and the sizing inputs are user-entered assumptions.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Свободный вход (любой сигнал)
bool
true
use_free_entry
Включить MA фильтр
bool
false
use_int_ma
Тип MA
string
EMA
ma_type
Период MA
int
200
ma_len
Включить Confirm MA
bool
true
use_conf_ma
Тип
string
SMA
conf_ma_type
Период
int
150
conf_ma_len
Структура рынка HH/HL
bool
true
use_struct
Pivot left
int
5
struct_pv_l
Pivot right
int
5
struct_pv_r
Окно (баров)
int
65
struct_len_v
MACD направление (фильтр)
bool
true
use_macd_f
Show all 40 settings
Setting
Type
Default
Variable
MACD быстрый
int
12
macd_fast
MACD медленный
int
26
macd_slow
MACD сигнал
int
9
macd_signal
Включить адаптивный режим
bool
true
use_adaptive
Адаптивный TP (зависит от ATR)
bool
true
use_adaptive_tp
Базовый TP %
float
3.0
tp_base_pct
Период ATR для TP
int
20
tp_atr_len
Множитель ATR→TP
float
1.0
tp_atr_mult
Адаптивный SL (зависит от ATR)
bool
true
use_adaptive_sl
Базовый SL %
float
9.0
sl_base_pct
Период ATR для SL
int
20
sl_atr_len
Множитель ATR→SL
float
0.5
sl_atr_mult
Включить Kelly Criterion
bool
true
use_kelly
WR% (для расчёта)
float
60.0
kelly_win_rate
Средний выигрыш %
float
3.0
kelly_avg_win
Средний убыток %
float
9.0
kelly_avg_loss
Коэффициент безопасности
string
Kelly/2 (рекомендовано)
kelly_safety
Максимум % на сделку
float
25.0
kelly_max_cap
SL по %
bool
true
use_sl_pct
Процент %
float
9.0
sl_pct_val
TP по %
bool
true
use_tp_pct
Процент %
float
3.0
tp_pct_val
Депозит $
float
1000.0
start_cap
Период ATR (основной)
int
17
atr_len
Показывать TP линии
bool
true
show_tp_line
Показывать SL линии
bool
true
show_sl_line
Показывать Kelly % на графике
bool
true
show_kelly
Показывать ATR/средний ratio
bool
true
show_atr_ratio
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.
The Hampel Filter indicator identifies and filters out price outliers to smooth price data directly on the main chart. It calculates the rolling median and Median Absolute Deviation (MAD) of the chosen source series over a specified length. When a data point e
This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver
This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre
This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
This indicator calculates an outlier-filtered moving average based on statistical filtering concepts. It stores close prices in a rolling array over a user-defined length, calculates the mean and standard deviation, and excludes values falling within a specifi