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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.