Bilateral Three-Point Moving Average Quantitative Trading Strategy
Overview
This strategy is based on the bilateral three-point moving average indicator. By calculating the mean value of the highest price, lowest price and closing price of the most recent N periods, it realizes the function of judging price trends and generating trading signals. This strategy is suitable for medium and short term trading, and can effectively filter market noise and capture price trends.
Strategy Principle
The core indicator of this strategy is the bilateral three-point moving average (XHL2, XHLC3). XHL2 calculates the mean value of the highest price and lowest price of the most recent N periods. XHLC3 calculates the mean value of the highest price, lowest price and closing price of the most recent N periods. These two indicators can effectively smooth price data and filter out the impact of short-term fluctuations.
The strategy judges the price trend by calculating the difference nMF between XHL2, XHLC3 and the closing price. When nMF is greater than a factor, it is judged that the price is in an upward trend; when nMF is less than a negative factor, it is judged that the price is in a downward trend. Combined with trading volume, the indicator nRES is calculated. nRES greater than 0 indicates a buy signal, and less than 0 indicates a sell signal. Trend direction and trading signals are determined based on the positive/negative sign and magnitude relationship of nRES.
Advantage Analysis
The advantages of this strategy are:
-
Using the bilateral three-point moving average indicator can effectively filter market noise and judge medium and long term price trends;
-
Combining changes in trading volume can more accurately determine the direction of capital flow and issue trading signals;
-
The strategy has few parameters, simple and easy to understand methods, and is easy to implement;
-
Flexible setting of holding direction, suitable for different types of investors.
Risk Analysis
The main risks of this strategy are:
-
Improper parameter settings may cause erroneous trading signals;
-
In a long-term strong trending market, the strategy may generate too many false trading signals;
-
In a volatile market, excessively small stop loss settings may increase the risk of loss.
Solutions:
-
Optimize parameters and determine the best parameters based on backtesting;
-
Judge the reliability of signals in combination with trends and support/resistance;
-
Appropriately relax the stop loss range to control single loss.
Optimization Directions
The optimization directions of this strategy:
-
Optimize the moving average parameters and trading volume parameters to improve the sensitivity of the indicator;
-
Add trend judgment indicators to improve the accuracy of trading signals;
-
Add stop loss strategies to reduce risk of loss;
-
Combine machine learning methods to achieve automatic parameter optimization.
Summary
This strategy is designed based on the bilateral three-point moving average indicator to determine the medium and long term trend direction of prices. It uses changes in trading volume to confirm capital inflows and outflows, and finally generates buy and sell trading signals. The strategy has large room for optimization and can be improved in multiple dimensions to adapt to more complex market environments.
/*backtest
start: 2023-01-24 00:00:00
end: 2024-01-30 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 25/06/2018
// The FVE is a pure volume indicator. Unlike most of the other indicators - 1

