Strategy · Pine Script v5 · On the chart

Percentile_SuperTrend_OBV&DI&EMA

by ymlee1104

This strategy overlays price and combines SuperTrend, ADX, OBV, MACD, directional movement, EMA, and a volatility filter to decide long and short entries.

View on GitHub

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code489
Settings40inputs
LicenceNone stated
Last update7 months ago13 Mar 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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

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

Each filter can be switched on or off, and trading starts only after a chosen date. It can close when enabled signals reverse or when SuperTrend, DI, or MACD flips, depending on those exit switches. Position size is a percentage of equity. Optional lines show SuperTrend, EMA, position, take profit, stop loss, and VWAP. The excerpt does not state a fixed stop distance.

Details

Published by

ymlee1104 on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Oscillators & momentum, Volume, Volatility & bands

Markets

Crypto

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Starttimetimestamp("2025-01-01 00:00 +0900")start_time
ActLongbooltrueactive_long
ActShortbooltrueactive_short
SuperTrendbooltrueshow_st_line
EMAboolfalseshow_ema_line
Positionbooltrueshow_position_line
TPbooltrueshow_tp_line
SLboolfalseshow_sl_line
VWAPboolfalseshow_vwap_line
STbooltrueST_on
ADXbooltrueADX_on
OBVbooltrueOBV_on
Show all 40 settings
SettingTypeDefaultVariable
MACDbooltrueMACD_on
DI 방향성booltrueDI_on
DI 이격도booltrueLimit_on
EMAbooltrueEMA_on
VolatilitybooltrueVolatility_on
VWAPboolfalseVWAP_on
체크된 신호반전 시 청산 ⇛booltrueexit_on_opposite
SuperTrendboolfalseexit_on_st_flip
DI방향boolfalseexit_on_di_flip
MACDboolfalseexit_on_macd_flip
+DI/-DI방향|booltrueuse_di_filter
DI 길이int33length_di
DI Srcsourceclosesrc_di
DMI DIint15dmiLength
ADX평활int22adxSmoothing
ADX임계float22.0adxThreshold
OBV EMAint12length_obv
기준선(롱)int0Baseline_long
(숏)int2Baseline_short
MACD Fast lengthint21fastLen_macd
MACD Slow lengthint93slowLen_macd
EMA Periodint15emaPeriod
Lookback Periodint14lookbackPeriod_ma
Overbought Levelfloat93overBought_ma
Oversold Levelfloat10overSold_ma
Smoothing Periodint9smoothingPeriod_ma
Smoothing TypestringEMAsmoothingType_ma
25 Percent lengthint25Percent25
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.

Similar Pine Scripts

6 stars

Capital41 Fusion Core Strategy is an overlay trading strategy that combines an exponential moving average trend filter, RSI, Williams %R, and volume/ATR expansion into a composite momentum oscillator. It executes long trades when the smoothed oscillator crosse

Strategy v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Fusion Core Strategy

This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes. It enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered b

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of XAUUSD High Probability Strategy

Parabolic SAR

by g-moe
3 stars

This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR
2 stars

This strategy calculates MACD, ADX trend strength, ATR, and a rolling VWAP resetting at fixed bar intervals. It plots the VWAP line, stop loss levels, and profit targets directly on the price chart. Long positions enter when MACD crosses above its signal line

Strategy v5 TrendOscillators & momentum Repaints
Updated 8 months ago · MIT GitHub repository of MACD & VWAP Strategy with ATR SL/Targets

This strategy generates trade entries by combining up to five normalized 0-100 technical indicators: Relative Strength Index (RSI with divergence detection), Stochastic RSI, Money Flow Index (MFI), Relative Volatility Index (RVI), and Average Directional Index

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TLC 0TO100 Five Indicators Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers