Type/to search

Swing High Low Price Channel Strategy V.1

Common strategy
Created: 2024-01-26 15:54:45
Last modified: 3 years ago
1
Follow
1802
Followers

img

Overview

This strategy calculates the highest and lowest prices within different timeframes (50 bars and 200 bars) to form the main price channel representing the long-term trend. It also uses fast and slow signal lines to determine the short-term trend direction. The strategy will prompt entry signals when the long-term and short-term trend directions are consistent.

Principle

Firstly, by calculating the highest and lowest prices of the last 50 bars and the last 200 bars, two price channels are formed to represent the long-term trend direction.

Secondly, the highest and lowest prices of the last 7 bars are calculated to form a fast signal channel to judge the short-term trend; The highest and lowest prices of the last 20 bars are calculated to form a slow signal channel to judge the shorter-term trend.

Finally, entry signals are prompted when the directions of the fast signal channel, slow signal channel and long-term price channel are consistent. For example, when all channels are in an upward trend, it will prompt to buy; when all channels are in a downward trend, it will prompt to sell.

Advantage Analysis

The biggest advantage of this strategy is that it can identify a unified trend direction in both long and short terms. By confirming the price channels of different time frames, it can effectively avoid being misled by short-term market noise.

In addition, the multi-timeframe judgement ensures signal stability even if short-term price reversal occurs.

Risk Analysis

The main risk of this strategy is that when long and short term trend reversal occurs, there will be a certain lag in signal generation due to the need for confirmation of multiple time frame channels. Blindly following at this time may lead to greater losses.

In addition, it is unfriendly to high frequency trading and unable to respond quickly to short-term price fluctuations. In case of violent market conditions, improper stop loss settings can also lead to large losses.

Optimization

Consider joining an adaptive dynamic stop loss strategy that stops loss when the price breaks through a certain percentage in an unfavorable direction to effectively control risks.

Also, more price channels of different lengths could be added and the final signal could be decided by voting to improve accuracy.

Alternatively, machine learning algorithms could be used to automatically optimize various channel parameters to better suit the current market environment.

Summary

The overall idea of this strategy is clear and easy to understand. By judging market trends through multi-timeframe price channels, it can effectively filter out short-term market noise. However, its handling of reversal trends and risk control need improvement. By combining stop loss strategies and parameter optimization, strategy stability and practical effects can be further enhanced.

Source
Pine
/*backtest
start: 2023-12-26 00:00:00
end: 2024-01-25 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/
// © ZoomerXeus

//@version=4
Strategy parameters
Strategy parameters
Main swing channel source
Fast Slow Length
Slow Slow Length
Show main channel only
Main line width
Signal line width
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)