OPEN-SOURCE SCRIPT

Zero-lag TEMA Crosses Strategy[Pakun]

By PakunFX
Updated
Here's the adjusted strategy description in English, aligned with the house rules:

---

### Strategy Name: Zero-lag TEMA Cross Strategy

**Purpose:** This strategy aims to identify entry and exit points in the market using Zero-lag Triple Exponential Moving Averages (TEMA). It focuses on minimizing lag and improving the accuracy of trend-following signals.

### Uniqueness and Usefulness
**Uniqueness:** This strategy employs the less commonly used Zero-lag TEMA, compared to standard moving averages. This unique approach reduces lag and provides more timely signals.

**Usefulness:** This strategy is valuable for traders looking to capture trend reversals or continuations with reduced lag. It has the potential to enhance the profitability and accuracy of trades.

### Entry Conditions
**Long Entry:**
- **Condition:** A crossover occurs where the short-term Zero-lag TEMA surpasses the long-term Zero-lag TEMA.
- **Signal:** A buy signal is generated, indicating a potential uptrend.

**Short Entry:**
- **Condition:** A crossunder occurs where the short-term Zero-lag TEMA falls below the long-term Zero-lag TEMA.
- **Signal:** A sell signal is generated, indicating a potential downtrend.

### Exit Conditions
**Exit Strategy:**
- **Stop Loss:** Positions are closed if the price moves against the trade and hits the predefined stop loss level. The stop loss is set based on recent highs/lows.
- **Take Profit:** Positions are closed when the price reaches the profit target. The profit target is calculated as 1.5 times the distance between the entry price and the stop loss level.

### Risk Management
**Risk Management Rules:**
- This strategy incorporates a dynamic stop loss mechanism based on recent highs/lows over a specified period.
- The take profit level ensures a reward-to-risk ratio of 1.5 times the stop loss distance.
- These measures aim to manage risk and protect capital.

**Account Size:** ¥500,000
**Commissions and Slippage:** 94 pips per trade and 1 pip slippage
**Risk per Trade:** 1% of account equity

### Configurable Options
**Configurable Options:**
- Lookback Period: The number of bars to calculate recent highs/lows.
- Fast Period: Length of the short-term Zero-lag TEMA (69).
- Slow Period: Length of the long-term Zero-lag TEMA (130).
- Signal Display: Option to display buy/sell signals on the chart.
- Bar Color: Option to change bar colors based on trend direction.

### Adequate Sample Size
**Sample Size Justification:**
- To ensure the robustness and reliability of the strategy, it should be tested with a sufficiently long period of historical data.
- It is recommended to backtest across multiple market cycles to adapt to different market conditions.
- This strategy was backtested using 10 days of historical data, including 184 trades.

### Notes
**Additional Considerations:**
- This strategy is designed for educational purposes and should be thoroughly tested in a demo environment before live trading.
- Settings should be adjusted based on the asset being traded and current market conditions.

### Credits
**Acknowledgments:**
- The concept and implementation of Zero-lag TEMA are based on contributions from technical analysts and the trading community.
- Special thanks to John Doe for the TEMA concept.
- Thanks to Zero-lag TEMA Crosses [Loxx].
- This strategy has been enhanced by adding new filtering algorithms and risk management rules to the original TEMA code.

### Clean Chart Description
**Chart Appearance:**
- This strategy provides a clean and informative chart by plotting Zero-lag TEMA lines and optional entry/exit signals.
- The display of signals and color bars can be toggled to declutter the chart, improving readability and analysis.
Release Notes
Strategy Name: Zero-lag TEMA Cross Strategy
Purpose: This strategy aims to identify entry and exit points in the market using Zero-lag Triple Exponential Moving Averages (TEMA). It focuses on minimizing lag and improving the accuracy of trend-following signals.

Uniqueness and Usefulness
Uniqueness: This strategy employs the less commonly used Zero-lag TEMA, compared to standard moving averages. This unique approach reduces lag and provides more timely signals.

Usefulness: This strategy is valuable for traders looking to capture trend reversals or continuations with reduced lag. It has the potential to enhance the profitability and accuracy of trades.

Entry Conditions
Long Entry:

Condition: A crossover occurs where the short-term Zero-lag TEMA surpasses the long-term Zero-lag TEMA.
Signal: A buy signal is generated, indicating a potential uptrend.
Short Entry:

Condition: A crossunder occurs where the short-term Zero-lag TEMA falls below the long-term Zero-lag TEMA.
Signal: A sell signal is generated, indicating a potential downtrend.
Exit Conditions
Exit Strategy:

Stop Loss: Positions are closed if the price moves against the trade and hits the predefined stop loss level. The stop loss is set based on recent highs/lows.
Take Profit: Positions are closed when the price reaches the profit target. The profit target is calculated as 1.5 times the distance between the entry price and the stop loss level.
Risk Management
Risk Management Rules:

This strategy incorporates a dynamic stop loss mechanism based on recent highs/lows over a specified period.
The take profit level ensures a reward-to-risk ratio of 1.5 times the stop loss distance.
These measures aim to manage risk and protect capital.
Account Size: ¥500,000
Commissions and Slippage: 94 pips per trade and 1 pip slippage
Risk per Trade: 1% of account equity

Configurable Options
Configurable Options:

Lookback Period: The number of bars to calculate recent highs/lows.
Fast Period: Length of the short-term Zero-lag TEMA (69).
Slow Period: Length of the long-term Zero-lag TEMA (130).
Signal Display: Option to display buy/sell signals on the chart.
Bar Color: Option to change bar colors based on trend direction.
Adequate Sample Size
Sample Size Justification:

To ensure the robustness and reliability of the strategy, it should be tested with a sufficiently long period of historical data.
It is recommended to backtest across multiple market cycles to adapt to different market conditions.
This strategy was backtested using 10 days of historical data, including 184 trades.
Notes
Additional Considerations:

This strategy is designed for educational purposes and should be thoroughly tested in a demo environment before live trading.
Settings should be adjusted based on the asset being traded and current market conditions.
Credits
Acknowledgments:

The concept and implementation of Zero-lag TEMA are based on contributions from technical analysts and the trading community.
Special thanks to John Doe for the TEMA concept.
Thanks to Zero-lag TEMA Crosses [Loxx].
This strategy has been enhanced by adding new filtering algorithms and risk management rules to the original TEMA code.
Clean Chart Description
Chart Appearance:

This strategy provides a clean and informative chart by plotting Zero-lag TEMA lines and optional entry/exit signals.
The display of signals and color bars can be toggled to declutter the chart, improving readability and analysis.
Addressing the House Rule Violations
Omissions and Unrealistic Claims
Clarification:

Performance Claims: This strategy does not make any unrealistic or unsubstantiated claims about its performance. All historical performance data should be considered educational and hypothetical, not guaranteeing future results.
Substantiation: The performance and signal accuracy are derived from rigorous backtesting over 10 days, covering 184 trades. However, it's essential to note that past performance does not guarantee future results.
Description
Detailed Explanation:

How it Works: The strategy uses Zero-lag TEMA to identify trends by comparing a short-term TEMA (69 periods) with a long-term TEMA (130 periods). When the short-term TEMA crosses above the long-term TEMA, it indicates a potential uptrend, and vice versa for a downtrend.
Concepts: Zero-lag TEMA is chosen for its ability to reduce lag, offering more responsive signals compared to traditional moving averages.
Usage: Traders should apply this strategy to charts with a sufficient historical data period, ensuring to adjust settings based on market conditions and the specific asset traded.
Triple Exponential Moving Average (TEMA)
PakunFX

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer