Type/to search

Momentum and Moving Average Combination Long Strategy

Common strategy
Created: 2024-02-29 11:57:18
Last modified: 2 years ago
1
Follow
1802
Followers

img

Overview

This strategy combines the MACD momentum indicator and the DMI trend indicator to go long when conditions are met. Its exits set a fixed take profit and a custom volatility trailing stop to lock in profits.

Principles

The entries of this strategy rely on the MACD and DMI indicators:

  • When MACD is positive (MACD line above Signal line), it indicates strengthening upside momentum in the market
  • When DI+ is higher than DI- in DMI, it indicates the market is in an uptrend

When both conditions are met at the same time, go long.

There are two standards for position exits:

  • Fixed take profit: close price rises to a set percentage for profit taking
  • Volatility trailing stop loss: use ATR and recent highest price to calculate a dynamically adjusted stop loss position. This can trailing stop loss according to market volatility

Advantages

  • The combination of MACD and DMI can more reliably determine the trend direction of the market and reduce erroneous operations
  • The profit taking conditions combine fixed take profit and volatility stop loss, which can flexibly lock in profits

Risks

  • Both MACD and DMI may produce false signals, leading to unnecessary losses
  • Fixed take profit may prevent profits from being maximized
  • The trailing speed of volatility stops may be improperly adjusted, too aggressive or conservative

Optimization Directions

  • Consider adding other indicators to filter entry signals, such as using the KDJ indicator to determine whether it is overbought or oversold
  • Different parameters can be tested for better take profit and stop loss effects
  • Parameters such as moving averages can be adjusted according to specific trading varieties to optimize the system

Summary

This strategy synthesizes multiple indicators to judge market trends and conditions, and intervenes in situations with a relatively large probability of favor. The profit taking conditions have also been optimally designed to ensure a certain profit while considering the flexibility of locking in gains. Through parameter adjustment and further risk management, this strategy can become a stable quantitative trading system.

Source
Pine
/*backtest
start: 2024-01-29 00:00:00
end: 2024-02-28 00:00:00
period: 2h
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/
//@version=4
strategy(shorttitle='(MACD + DMI Scalping with Volatility Stop',title='MACD + DMI Scalping with Volatility Stop by (Coinrule)', overlay=true, initial_capital = 100, process_orders_on_close=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, commission_type=strategy.commission.percent, commission_value=0.1)
Strategy parameters
Strategy parameters
From Month
From Day
From Year
Thru Month
Thru Day
Thru Year
Show Date Range
v_input_8
Length
Source
vStop Multiplier
Comment
All comments (0)
No data
No data
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)