-
This script implements a comprehensive trading safety mechanism that includes trailing stops, fallback protection, and break-even safety features. The logic is designed to maximize profits while minimizing risks through well-defined parameters and conditions.
Key Features:
Trailing Stops:Begins trailing when a specified profit percentage (trailStartPrc) is reached.
Adjusts the stop level based on the highest recorded profit and a trailing distance (trailDistPrc).
Supports different trailing modes (default, grow, shrink).
Fallback Protection:Optional feature to prevent bagging up on a weak trend.
Activates after the trailing stop is stopped a specified number of times (maxFallbackProtect).
Includes its own rebound mechanism to allow for market corrections before triggering an exit.
Break Even Safety:Activates when a specified percentage price change (breakEvenMinPrc) is reached.
Sets the entry price as a stop-loss level to exit the position near break-even if the market moves against the position.
Includes a rebound mechanism to allow for market corrections before triggering an exit.