OPEN-SOURCE SCRIPT
Long Only - Double EMA + Session

Overview
This is a high-probability Long-Only trend-following strategy designed primarily for the 65-minute and 4-hour timeframes. It utilizes a dual-layered filter system to align trades with both macro and mid-term market momentum, ensuring entries only occur during healthy uptrends. The strategy is optimized for volatile, high-growth assets like TSLA and MSFT.
How It Works
The strategy relies on three primary pillars of technical analysis to confirm an "A+" setup:
Macro Trend Filter (200 EMA): We only look for long opportunities when the price is above the 200-period Exponential Moving Average. This keeps the strategy on the right side of the long-term trend and avoids "buying the dip" during major bear markets.
Momentum Filter (50 EMA): The 50 EMA acts as a local trend filter. By requiring price to be above both EMAs, we ensure the medium-term momentum is also bullish.
The Trigger (Stochastic RSI): We enter when the Stochastic RSI K-line crosses above the 20 level (Oversold). This identifies local "oversold" pullbacks within a larger uptrend.
Risk Management & Exit Plan
This strategy is built with professional-grade capital preservation in mind:
Trailing Stop-Loss: A 5% trailing stop follows the price as it moves in our favor. This protects unrealized profits and helps mitigate the drawdown during sudden reversals.
Dynamic Profit Target: The strategy exits automatically if the Stochastic RSI K-line reaches the 97 level, capturing gains at the peak of momentum.
Session Filter: To avoid the "noise" of pre-market and low-volume afternoon trading, the strategy is restricted to the Market Open (9:30 AM EST) window where institutional volume is highest.
Backtesting Notes
Realistic Simulation: This strategy includes a 0.05% commission and 2 ticks of slippage to reflect real-world execution costs.
Recommended Assets: Optimized for Nasdaq-100 components and high-volume growth stocks.
Timeframe: Best performance found on 65m or 4h intervals.
This is a high-probability Long-Only trend-following strategy designed primarily for the 65-minute and 4-hour timeframes. It utilizes a dual-layered filter system to align trades with both macro and mid-term market momentum, ensuring entries only occur during healthy uptrends. The strategy is optimized for volatile, high-growth assets like TSLA and MSFT.
How It Works
The strategy relies on three primary pillars of technical analysis to confirm an "A+" setup:
Macro Trend Filter (200 EMA): We only look for long opportunities when the price is above the 200-period Exponential Moving Average. This keeps the strategy on the right side of the long-term trend and avoids "buying the dip" during major bear markets.
Momentum Filter (50 EMA): The 50 EMA acts as a local trend filter. By requiring price to be above both EMAs, we ensure the medium-term momentum is also bullish.
The Trigger (Stochastic RSI): We enter when the Stochastic RSI K-line crosses above the 20 level (Oversold). This identifies local "oversold" pullbacks within a larger uptrend.
Risk Management & Exit Plan
This strategy is built with professional-grade capital preservation in mind:
Trailing Stop-Loss: A 5% trailing stop follows the price as it moves in our favor. This protects unrealized profits and helps mitigate the drawdown during sudden reversals.
Dynamic Profit Target: The strategy exits automatically if the Stochastic RSI K-line reaches the 97 level, capturing gains at the peak of momentum.
Session Filter: To avoid the "noise" of pre-market and low-volume afternoon trading, the strategy is restricted to the Market Open (9:30 AM EST) window where institutional volume is highest.
Backtesting Notes
Realistic Simulation: This strategy includes a 0.05% commission and 2 ticks of slippage to reflect real-world execution costs.
Recommended Assets: Optimized for Nasdaq-100 components and high-volume growth stocks.
Timeframe: Best performance found on 65m or 4h intervals.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。