OPEN-SOURCE SCRIPT

SMA Stufen-TP Strategie (200/100/50/25) mit Reentry

52
Strategy Description for TradingView: Multi-SMA Momentum & Reentry System
This Pine Script strategy, named "SMA Stufen-TP Strategie (200/100/50/25) mit Reentry," is a Long-Only trend-following system designed to capitalize on upward momentum and capture significant gains while incorporating sophisticated logic for reentry after corrections.

The system relies on four Simple Moving Averages (SMAs): SMA 200, SMA 100, SMA 50, and SMA 25. These indicators are used to define the trend structure, trigger entries, and set dynamic, layered Take-Profit (TP) levels.

Entry Rules
The strategy has one main entry and two specific reentry triggers:

Main Entry (Standard Trend): A long position is opened when the price crosses above the SMA 200. This acts as the initial signal for a strong, long-term uptrend.

Reentry 1 (Medium Correction): This reentry is sought after an official exit (Stop Loss or Take Profit). It is permitted if the SMA 100 is above the SMA 200 and two conditions are met: the price previously dipped below the SMA 100 during the correction, and it now closes two consecutive bars above the SMA 100. This targets a confirmed bounce within an overall bullish structure.

Reentry 2 (Deep Correction/Momentum Shift): This triggers during a deep correction where all shorter SMAs (100, 50, 25) are below the SMA 200. Reentry occurs when the SMA 25 crosses above the SMA 50, signaling a powerful short-term momentum shift that precedes a larger recovery.

Exit and Take-Profit Logic
Exits are governed by a prioritized system including a fixed Stop Loss and three dynamic Take-Profit stages.

A. Stop Loss (Highest Priority)
The primary risk control is a fixed Stop Loss at -10% below the entry price. This is always the first exit condition checked.

B. Layered Take-Profits (TP)
Profits are secured using a step-wise mechanism that trails the price using the shorter SMAs, but only after specific profit thresholds are met. This ensures that the strategy provides ample room for a strong rally while securing gains as the trend matures.

TP Stage 1: Activated when the price first crosses above the SMA 100. The position is closed if the profit reaches 10% or more and the price closes two consecutive bars below the SMA 100.

TP Stage 2: Activated when the price first crosses above the SMA 50. The position is closed if the profit reaches 20% or more and the price closes two consecutive bars below the SMA 50.

TP Stage 3: Activated when the price first crosses above the SMA 25. The position is closed if the profit reaches 40% or more and the price closes two consecutive bars below the SMA 25.

The exit priority ensures that the tightest active stop is used: Stop Loss takes precedence, followed by TP 3 (the highest profit and tightest trail), then TP 2, and finally TP 1.

إخلاء المسؤولية

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.