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.

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
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟