The strategy uses two Simple Moving Averages (SMA): an upper MA based on the high price and a lower MA based on the low price. Key features include:
Entry Condition: Enter a long position after five consecutive bars close above the upper MA. Exit Conditions: Close the position if five consecutive bars close below the lower MA. Close the position if the price drops below 25% of the highest price recorded since entry (stop-loss).
Key Features: Dynamic Entry: Long position is triggered only after consistent strength in price (5 bars above the upper MA). Dynamic Exit: Tracks weakness (5 bars below the lower MA) for exit. Implements a stop-loss based on 25% retracement from the highest price recorded post-entry. Customizable Parameters: MA lengths and stop-loss percentage are adjustable to fit different trading styles and market conditions. This script provides a simple yet effective trend-following strategy with built-in risk management.