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
375 lines of Pine Script v5 from 策略/开源分享/zigzag+ qqe 策略.txt, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Momentum-based ZigZag + 趋势 allows selecting between QQE, MACD, or Moving Averages to drive the ZigZag pivot logic. The strategy includes adjustable trailing profit targets, risk-to-reward settings, and optional trendlines painted directly on the main chart. Because it utilizes ZigZag pivot logic, historical signal lines and pivots repaint until confirmed.
Momentum ZigZag using QQE, MACD, or Moving Averages
Integrated Supertrend overlay with custom ATR settings
EMA trend filter for entry direction control
Configurable trailing take-profit and risk-reward inputs
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
多少根K线参与计算
int
5
lowest
盈亏比
int
3
RRR
是否开启多单
bool
true
longOn
是否开启空单
bool
true
shortOn
是否开启趋势线
bool
true
trendOn
ema参数
int
200
emaNo
long移动止盈参数
float
0.004
long_Ts2
short移动止盈参数
float
0.002
short_Ts2
Color ZigZag lines to show force direction
bool
true
color_zigzag_lines
Select Momentum Indicator:
string
QQE
momentum_select
Rsi-Type
string
Wilders
r1_type
Rsi-Len
int
14
r1_len
Show all 37 settings
Setting
Type
Default
Variable
Mtf-Mult
int
2
r1_mtf
QQe-Mult
float
3
r1_mult
Smooth
int
1
r1_smooth
Show-Supertrend
bool
true
s1_show
Ma-Len
int
34
s1_len
Ma-Type
string
EMA
s1_type
Atr-Len
int
34
s1_atr_len
Atr-Mult
float
4.25
s1_atr_mult
Include-ZigZag
bool
true
s1_incl
UpTrend
color
color.green
s1_bull
DownTrend
color
color.red
s1_bear
Line
int
1
s1_line
Fast Length
int
12
fast_length
Slow Length
int
26
slow_length
Source
source
close
src
Signal Smoothing
int
9
signal_length
Oscillator MA Type
string
EMA
sma_source
Signal Line MA Type
string
EMA
sma_signal
Average type
string
SMA
smoothing_type
Length
int
20
ma_length
RSI Length
int
14
RSI_Period
QQE Factor
float
4.238
qqeslow
RSI Smoothing
int
5
SFslow
Thresh-hold
int
10
ThreshHold
TakeProfitLevel
int
200
TakeProfitLevel
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.
This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av
This strategy trades 1-minute futures contracts on Binance. It plots pivot high and low resistance and support levels on the price chart, along with an EMA and a custom Cto indicator. Long and short entries trigger on EMA and Cto crossovers combined with price
This strategy identifies reversal opportunities based on liquidity sweeps and multi-gate confluence scoring. It evaluates setups using mandatory conditions such as swing sweeps, body and ATR filters, and dual EMA higher-timeframe trend alignment, alongside opt
This strategy plots dynamic pivot-based support and resistance trendlines on the price chart and trades breakouts beyond those lines. By default it allows longs only when EMA 50 is above EMA 200 and an RSI-SMA momentum filter is met, with an ATR entry buffer.
This strategy generates long signals on the price chart using multiple technical indicators. It computes EMA 70 and 100, SMA 70, ADX with DMI, CCI, and MACD values. A long entry occurs when EMA crossover condition, SMA condition, ADX above 15, CCI above 30, an
This strategy combines MACD momentum signals with support and resistance levels from pivot points and an EMA100 trend filter for long positions. It plots the 100-period EMA on the price chart and signals when price breaks above the EMA or forms bullish pivot p