
This strategy is named “Trend Tracking Strategy Based on Dual Vortex Indicator Combined with True Strength Index”. It opens long and short positions when the dual vortex indicator and true strength index issue buy and sell signals, and closes positions after a certain price movement to capture medium- to long-term trends.
This strategy uses both the dual vortex indicator and the true strength index (TSI). The dual vortex indicator consists of VI+ and VI- lines, reflecting the magnitude of upward and downward momentum respectively. The TSI has red and blue lines measuring the strength and direction of price changes.
When VI+ rises and VI- falls, indicating strengthening uptrend and weakening downtrend momentum, the dual vortex indicator generates a long signal. If at the same time, the TSI blue line crosses above the red line, TSI also issues a long signal. The strategy will open a long position when both indicators give out long signals simultaneously.
Conversely, when VI+ falls and VI- rises, signaling weakening upside momentum and strengthening downside momentum, the dual vortex gives out a short signal. If the TSI blue line crosses below the red line as well, the TSI produces a short signal too. The strategy then opens a short position upon receiving aligned short signals.
By combining signals from both indicators this way, the strategy is able to identify and track nascent medium- to long-term trends. Exit signals are generated when the trends end. Thus, this strategy can effectively capture large trend-following moves in the market.
The main advantages of this strategy include:
Some risks also exist:
Some ways to optimize the strategy include:
In summary, this strategy is an excellent medium- to long-term trend following approach. By leveraging the techniques of dual vortex indicator and TSI, it can recognize emerging mid- to long-term trends reliably. With proper parameter tuning, per trade risks can be managed. Further optimizations by incorporating more indicators and risk control techniques would lead to improved performance. It suits investors interested in mid- to long-term trend trading.
/*backtest
start: 2023-11-11 00:00:00
end: 2023-12-11 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © hydrelev
//@version=4
strategy("Vortex TSI strategy", overlay=false)
///////////////////INDICATOR TSI
long = input(title="Long Length", type=input.integer, defval=25)
short = input(title="Short Length", type=input.integer, defval=13)
signal = input(title="Signal Length", type=input.integer, defval=13)
price = close
double_smooth(src, long, short) =>
fist_smooth = ema(src, long)
ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_blue = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
tsi_red = ema(tsi_blue, signal)
// plot(tsi_blue, color=#3BB3E4)
// plot(tsi_red, color=#FF006E)
// hline(0, title="Zero")
/////////////////INDICATOR VI
period_ = input(14, title="Period", minval=2)
VMP = sum( abs( high - low[1]), period_ )
VMM = sum( abs( low - high[1]), period_ )
STR = sum( atr(1), period_ )
VIP_blue = VMP / STR
VIM_red = VMM / STR
// plot(VIP_blue, title="VI +", color=#3BB3E4)
// plot(VIM_red, title="VI -", color=#FF006E)
////////////////////STRATEGY
bar=input(1, title="Close after x bar", minval=1, maxval=50)
tsi_long = crossover(tsi_blue, tsi_red)
tsi_short = crossunder(tsi_blue, tsi_red)
vi_long = crossover(VIP_blue, VIM_red)
vi_short = crossunder(VIP_blue, VIM_red)
LongConditionOpen = tsi_long and vi_long ? true : false
LongConditionClose = tsi_long[bar] and vi_long[bar] ? true : false
ShortConditionOpen = tsi_short and vi_short ? true : false
ShortConditionClose = tsi_short[bar] and vi_short[bar] ? true : false
if (LongConditionOpen)
strategy.entry("Long Entry", strategy.long)
if (LongConditionClose)
strategy.close("Long Entry")
if (ShortConditionOpen)
strategy.entry("Short Entry", strategy.short)
if (ShortConditionClose)
strategy.close("Short Entry")