TradingView
MightyZinger
5 mar 2022 17:44

EDMA Scalping Strategy (Exponentially Deviating Moving Average) 

Bitcoin all time history indexINDEX

Beskrivning

This strategy uses crossover of Exponentially Deviating Moving Average (MZ EDMA) along with Exponential Moving Average for trades entry/exits. Exponentially Deviating Moving Average (MZ EDMA) is derived from Exponential Moving Average to predict better exit in top reversal case.

EDMA Philosophy
EDMA is calculated in following steps:
  • In first step, Exponentially expanding moving line is calculated with same code as of EMA but with different smoothness (1 instead of 2).
  • In 2nd step, Exponentially contracting moving line is calculated using 1st calculated line as source input and also using same code as of EMA but with different smoothness (1 instead of 2).
  • In 3rd step, Hull Moving Average with 2/3 of EDMA length is calculated using final line as source input. This final HMA will be equal to Exponentially Deviating Moving Average.

EDMA Defaults
Currently default EDMA and EMA length is set to 20 period which I've found better for higher timeframes but this can be adjusted according to user's timeframe. I would soon add Multi Timeframe option in script too. Chikou filter's period is set to 25.

Additional Features
  • EMA Band: EMA band is shown on chart to better visualize EMA cross with EDMA.
  • Dynamic Coloring: Chikou Filter library is used for derivation of dynamic coloring of EDMA and its band.
  • Trade Confirmation with Chikou Filter: Trend filteration from Chikou filter library is used as an option to enhance trades signals accuracy.

    Strategy Default Test Settings
    For backtesting purpose, following settings are used:
    • Initial capital=10000 USD
    • Default quantity value = 5 % of total capital
    • Commission value = 0.1 %
    • Pyramiding isn't included.
    • Backtesting data never assures that the same results would occur in future and also above settings use very less of total portfolio for trades, which in a way results less maximum drawdown along with less total profit on initial capital too. For example, increasing default quantity value will definity increase maximum drawdown value. The other way is also to use fix contracts in backtesting but it all depends on users general practice. Best option is to explore backtesting results with manually modified settings on different charts, before trusting them for other uses in future.
    Usage and In-Detail Backtesting
    • This strategy has built-in option to enable trade confirmations with Chikou filter which will reduce the total number of trades increasing profit factor.
    • Symmetrically Weighted Moving Average (SWMA) on input source, may risk repainting in real-time data. Better option is to run a trade on bar close or simply left this optin unchecked.
    • I've set Chikou filter unchecked to increase number of trades (greater than 100) on higher timeframe (12H) and this can be changed according to your precision requirement and timeframe.
    • Timeframes lower than 4H usually have more noise. So its better to use higher EDMA and EMA length on lower timeframes which will decrease total number of offsetting trades increasing average total number of bars within a single trade.

    Original "Exponentially Deviating Moving Average (MZ EDMA)" Indicator can be found here.
    tradingview.com/script/x5PyksrR-Exponentially-Deviating-Moving-Average-MZ-EDMA/

Versionsinformation

Removed unnecessary label script

Versionsinformation

Added strategy close before entering new one.
Kommentarer
Ether2020
Thank you for sharing and make this a strategy my friend! You are an artist, super!
MightyZinger
@Ether2020, Thanks alot, I really appreciate it :)
Ether2020
@MightyZinger, You are more than welcome my friend!!
PJYWMVG4075
Hi
Your script seems good. I want to automate your scalping strategy.
How can I automate it?
Thanks for your attention
MightyZinger
@PJYWMVG4075, You can use alerts with webhooks directed to some 3rd party app or simply use tradingview built in brokers from trading panel.
eatho23
@MightyZinger, apologies in advance for the dumb question.. do I need to edit the alert message commands to automate via alertatron (webhooks 3rd party app)? I assume I would need to learn the code to set the parameters of the alert ?
MightyZinger
@eatho23, Webhooks with 3rd party service don't really require any coding. You just need to enter your unique message provided by the service you are using in Alerts Message field.
GURUWIN
@PJYWMVG4075, you can use a trading bot like 3 commas.
Mer