OPEN-SOURCE SCRIPT
Lab: Daily 50/200 EMA + ATR Stop (Long Only) by FlyingOceanTiger

WHAT IT IS
Simple long-only daily trend system that combines the classic 50/200 EMA trend filter with an ATR-based trailing stop. Built as a lab tool for studying daily swing trades on major crypto pairs.
CORE IDEA
* Only trade in a bullish regime (50 EMA above 200 EMA).
* Enter when price shows strength in that trend.
* Exit using a volatility stop (ATR) or when the trend breaks.
* Keep rules simple and transparent so it’s easy to study and tweak.
LOGIC (DEFAULT VERSION)
Trend filter:
* Long signals only when EMA 50 > EMA 200 (bull trend).
Entry conditions:
* Price confirms strength above the fast EMA in a bullish regime.
* Strategy opens a “Long Entry” on the bar that meets the conditions.
Exit conditions:
* Primary exit: price hits the ATR stop line that trails under price.
* Failsafe exit: trend filter breaks / close back under key levels.
Timeframe:
* Designed and tested on 1D candles (daily bars), especially on BTC, ETH, SOL, XRP, BNB.
INTENDED USE
* Research tool to see how a basic 50/200 + ATR framework behaves through full bull/bear cycles.
* Simple daily swing-trade engine for long-only crypto exposure.
* Clean baseline to compare against more complex systems and filters.
NOTES / DISCLAIMER
* Works on any symbol and timeframe, but all testing was on daily crypto pairs.
* Parameters are intentionally minimal so you can experiment with your own settings.
* For educational and testing purposes only. Not financial advice and no guarantee of future results.
Simple long-only daily trend system that combines the classic 50/200 EMA trend filter with an ATR-based trailing stop. Built as a lab tool for studying daily swing trades on major crypto pairs.
CORE IDEA
* Only trade in a bullish regime (50 EMA above 200 EMA).
* Enter when price shows strength in that trend.
* Exit using a volatility stop (ATR) or when the trend breaks.
* Keep rules simple and transparent so it’s easy to study and tweak.
LOGIC (DEFAULT VERSION)
Trend filter:
* Long signals only when EMA 50 > EMA 200 (bull trend).
Entry conditions:
* Price confirms strength above the fast EMA in a bullish regime.
* Strategy opens a “Long Entry” on the bar that meets the conditions.
Exit conditions:
* Primary exit: price hits the ATR stop line that trails under price.
* Failsafe exit: trend filter breaks / close back under key levels.
Timeframe:
* Designed and tested on 1D candles (daily bars), especially on BTC, ETH, SOL, XRP, BNB.
INTENDED USE
* Research tool to see how a basic 50/200 + ATR framework behaves through full bull/bear cycles.
* Simple daily swing-trade engine for long-only crypto exposure.
* Clean baseline to compare against more complex systems and filters.
NOTES / DISCLAIMER
* Works on any symbol and timeframe, but all testing was on daily crypto pairs.
* Parameters are intentionally minimal so you can experiment with your own settings.
* For educational and testing purposes only. Not financial advice and no guarantee of future results.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.