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.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。