Type/to search

Logarithmic Moving Average Convergence Divergence Strategy

Cryptocurrency
Created: 2023-09-21 15:38:05
Last modified: 3 years ago
1
Follow
1781
Followers

Overview

This strategy generates trading signals using the Logarithmic MACD indicator. It calculates the difference between fast and slow logarithmic moving averages to gauge market momentum and opportunities.

Strategy Logic

The main logic is:

  • Calculate fast logarithmic MA (default 12) and slow logarithmic MA (default 26)

  • Logarithmic MACD is their difference, expressing market momentum

  • Signal line is smoothed MA of MACD (default 9)

  • Go long when MACD crosses above signal from below

  • Go short when MACD crosses below signal from above

  • MACD-Signal difference plotted as histogram

Compared to simple MACD, logarithmic MACD can better highlight exponential growth trends. Log transform maintains comparability of volatile values on the chart.

Advantages

  • Detects exponential price movements using logarithmic transform

  • Log MACD highlights price fluctuation information

  • Signal line smooths MACD into trading signals

  • MACD histogram intuitively shows trend direction

Risks

  • Log transform may amplify price noise

  • Frequent signals, risks over-trading

  • No stop loss management, incomplete risk control

Mitigations:

  • Adjust parameters to reduce signal frequency

  • Add filters to avoid signals in choppy conditions

  • Implement stop loss to control loss per trade

Enhancement Opportunities

  • Optimize parameters for stability

  • Try other transforms like exponential moving average

  • Add trend filter to screen signals

  • Incorporate stop loss strategies

  • Use machine learning to judge signal reliability

Conclusion

The logarithmic transform enhances MACD's sensitivity for early trend detection. But trade frequency should be controlled. With optimizations in parameters, risk management etc., this strategy can become a stable and unique quantitative system.

Source
Pine
/*backtest
start: 2022-09-14 00:00:00
end: 2023-09-20 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy(title="Logarithmic Moving Average Convergence Divergence Strategy", shorttitle="LMACD Strategy")

// Getting inputs
Strategy parameters
Strategy parameters
Fast Length
Slow Length
Source
Signal Smoothing
Simple MA(Oscillator)
Simple MA(Signal Line)
Comment
All comments (0)
No data
No data
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)