Type/to search

Auto Trading Strategy Based on Multiple Indicators and Dynamic Stop Loss

Cryptocurrency
Created: 2023-09-26 14:38:40
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy combines multiple indicators like fast, medium, slow MA lines and MACD to generate comprehensive trading signals, and uses dynamic stop loss based on ATR to control risk level. It is suitable for medium-term automated trading.

Strategy Logic

The strategy mainly utilizes EMA, MACD and ATR indicators. EMA fast, medium and slow lines form the trend judgment system. MACD generates trading signals. ATR sets stop loss lines dynamically. Specifically, the trend direction is determined by the combination of the EMA lines. MACD crossover 0 is the entry signal. Enter long when fast line crosses above medium line, and exit when crossing below. Enter short when fast line crosses below medium line, and exit when crossing above. Stop loss adjusts dynamically based on ATR to control risk according to market volatility.

Advantage Analysis

  • Combining multiple indicators makes trading signals accurate and reliable.
  • Fast, medium and slow EMA system provides clear trend judgment.
  • MACD assists entry to avoid false breakout.
  • Dynamic stop loss manages risk better.
  • The mechanical strategy suits automated trading well.

Risks and Improvements

  • Complex parameters require extensive optimization.
  • Complex logic of multiple indicators makes manual trading difficult.
  • Should add other filters like volume to avoid being trapped.
  • Can consider optimizing to machine learning strategy for automated parameter tuning.

Summary

The strategy combines advantages of multiple indicators for accurate trend judgment and drawdown control. Further enhancements like parameter optimization and adding filters can improve robustness. Overall it is a typical and reliable strategy suitable for medium-term automated trading with great practical value.

Source
Pine
/*backtest
start: 2023-09-18 00:00:00
end: 2023-09-18 21:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
strategy("STRAT_STEMWAP", overlay=true, pyramiding = 0, default_qty_value = 10, slippage = 3)

EMA_Smooth_Period = input(7, minval=1)
Strategy parameters
Strategy parameters
EMA_Smooth_Period
ST_VWAP_Period
VWAP_TUNING_MULT
ATR Period
ATR Multiplier
Show Buy/Sell Labels ?
Highlight State ?
StopLoss_Long_Adjust
StopLoss_Short_Adjust
fastLength
medLength
slowLength
signalLength
ATR_Signal_Period
ATR_SIGNAL_FINE_TUNE
StopLoss_Initial_Short
StopLoss_Initial_Long
VOLUME_CHECK_SHORT
VOLUME_CHECK_LONG
MAX_LOSS
From Minute
From Hour
From Day
From Month
From Year
Till Minute
Till Hour
Till Day
Till Month
Till Year
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)