OPEN-SOURCE SCRIPT
DeepSeek_Multi-Timeframe EMA Strategy BTC_1H

Strategy Description: "DeepSeek_Multi-Timeframe EMA Strategy BTC_1H"
This is a trading strategy for TradingView that uses a multi-timeframe Exponential Moving Average (EMA) crossover system to generate trade signals on a 1-hour Bitcoin (BTC) chart.
Core Logic & Trading Rules
The strategy's logic is based on the alignment of two different EMA timeframes:
Higher Timeframe (HTF) Trend Filter: A slower EMA (default: 50) is calculated on a higher timeframe (default: 1D). This defines the primary, long-term trend.
Lower Timeframe (LTF) Signal Trigger: A faster EMA (default: 20) is calculated on the current chart timeframe (1H). This is used for precise entry and exit timing.
Long Entry Conditions (All must be true):
Trend Alignment: The LTF EMA (20) must be above the HTF EMA (50).
Price Position: The current closing price must be above the HTF EMA (50), confirming the bullish trend.
Entry Trigger: The closing price must cross above the LTF EMA (20).
Exit Condition (for Long Positions):
The strategy closes any open long position when:
The LTF EMA (20) is below the HTF EMA (50) (counter-trend), and
The closing price crosses below the LTF EMA (20).
Key Features & Configuration
Strategy Configuration: It uses a strategy script, which can perform backtesting and forward-testing.
Initial Capital: $1,000.
Order Sizing: 100% of equity per trade (default_qty_value = 100).
Pyramiding: Only 1 active position is allowed at a time (pyramiding = 1).
Commission: 0.1% is factored into calculations.
Order Execution: Orders are executed at the close of the 1-hour bar where the signal appears (process_orders_on_close=true).
Visualization:
The HTF EMA (50) is plotted as a thick purple line.
The LTF EMA (20) is plotted as an orange line.
Green upward triangles below the bar indicate Long Entry signals.
Red downward triangles above the bar indicate Exit (Short) signals.
Summary
In essence, this strategy aims to "buy the dip" within a larger uptrend. It waits for the higher timeframe to be bullish, and then enters on a short-term pullback to the faster moving average. It exits the trade when the shorter-term trend turns bearish relative to the longer-term trend. It does not take short/sell positions; it only goes long or is out of the market.
This is a trading strategy for TradingView that uses a multi-timeframe Exponential Moving Average (EMA) crossover system to generate trade signals on a 1-hour Bitcoin (BTC) chart.
Core Logic & Trading Rules
The strategy's logic is based on the alignment of two different EMA timeframes:
Higher Timeframe (HTF) Trend Filter: A slower EMA (default: 50) is calculated on a higher timeframe (default: 1D). This defines the primary, long-term trend.
Lower Timeframe (LTF) Signal Trigger: A faster EMA (default: 20) is calculated on the current chart timeframe (1H). This is used for precise entry and exit timing.
Long Entry Conditions (All must be true):
Trend Alignment: The LTF EMA (20) must be above the HTF EMA (50).
Price Position: The current closing price must be above the HTF EMA (50), confirming the bullish trend.
Entry Trigger: The closing price must cross above the LTF EMA (20).
Exit Condition (for Long Positions):
The strategy closes any open long position when:
The LTF EMA (20) is below the HTF EMA (50) (counter-trend), and
The closing price crosses below the LTF EMA (20).
Key Features & Configuration
Strategy Configuration: It uses a strategy script, which can perform backtesting and forward-testing.
Initial Capital: $1,000.
Order Sizing: 100% of equity per trade (default_qty_value = 100).
Pyramiding: Only 1 active position is allowed at a time (pyramiding = 1).
Commission: 0.1% is factored into calculations.
Order Execution: Orders are executed at the close of the 1-hour bar where the signal appears (process_orders_on_close=true).
Visualization:
The HTF EMA (50) is plotted as a thick purple line.
The LTF EMA (20) is plotted as an orange line.
Green upward triangles below the bar indicate Long Entry signals.
Red downward triangles above the bar indicate Exit (Short) signals.
Summary
In essence, this strategy aims to "buy the dip" within a larger uptrend. It waits for the higher timeframe to be bullish, and then enters on a short-term pullback to the faster moving average. It exits the trade when the shorter-term trend turns bearish relative to the longer-term trend. It does not take short/sell positions; it only goes long or is out of the market.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.