wbburgin

Zero-lag Volatility-Breakout EMA Trend Strategy

This is a simple volatility-breakout strategy which uses the difference in two different zero-lag* EMAs (explained below on what exactly I mean by this) to track the upwards or downwards strength of an instrument. When the difference breaks above a Bollinger Band of a configurable standard deviation multiple, the strategy enters based off the direction of the base EMA used (i.e. if the difference breaks above and the current EMA is rising, a long entry is produced. If the difference breaks above and the current EMA is falling, a short entry is produced).

The two EMA-type metrics used to calculate the volatility difference are calculated by the following formula:

top_ema = math.max(src, ta.ema(src, length))
bottom_ema = math.min(src, ta.ema(src, length))

ema_difference = (top_ema - bottom_ema) - 1

This produces a difference which responds immediately to large price movements, instead of lagging if it used strictly the EMA itself.

SETTINGS
Source: The source of the strategy - close, hlc3, another indicator plot, etc.
EMA Difference Length: The length of both the EMA difference statistics and the base EMA used to calculate the entry side.
Standard Deviation Multiple: The Bollinger Bands multiple used when the difference is breaking out.
Use Binary Strategy: The strategy has two configurations: Binary and Rapid-Exit. 'Binary' means that it will not close a long position until a short position is generated, and vice-versa. 'Rapid-Exit' will close a long or short position once the difference reaches the middle Bollinger Band MA. This means that turning on 'Binary' will expose you to more market risk, but potentially greater market return. Turning off 'Binary' will exit quickly and reduce drawdown.

The strategy results below use 10% equity and 0.1% fees per trade.

PM me to test any of my strategies free for 7 days.

Invite-only indicators: www.patreon.com/wbburgin/membership
Test my strategies on CryptoRobotics: cryptorobotics.co/?trade=f23b09
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?