OPEN-SOURCE SCRIPT
PMax - Asymmetric Multipliers

Description: This script is an enhanced version of the popular PMax (Profit Maximizer) indicator, originally developed by KivancOzbilgic. It has been converted into a full strategy with advanced customization options for backtesting and trend following.
Key Features & Modifications:
Asymmetric ATR Multipliers: Unlike the standard version, this script allows you to set different ATR multipliers for Upper (Short/Resistance) and Lower (Long/Support) bands.
Default Upper: 1.5 (Tighter trailing for Short positions)
Default Lower: 3.0 (Wider trailing for Long positions to avoid whipsaws)
Expanded MA Types: Added HULL (HMA) and VAR (Variable Index Dynamic Average) options.
VAR is highly recommended for filtering out noise in ranging markets.
HULL is ideal for scalping and faster reactions.
Built-in Risk Management: A fixed 5% Stop Loss mechanism is integrated into the strategy. It protects your capital by closing positions if the price moves 5% against you, even if the trend hasn't reversed yet.
Visibility Fix: Solved the issue where the PMax line would disappear or start at zero in the initial bars.
How to Use:
Use the VAR MA type for trend following in volatile markets.
Adjust the "Stop Loss Percent" input to fit your risk appetite.
The strategy employs an "Always In" logic (Long/Short) but respects the hard Stop Loss.
Credits: Original PMax logic by KivancOzbilgic.
Key Features & Modifications:
Asymmetric ATR Multipliers: Unlike the standard version, this script allows you to set different ATR multipliers for Upper (Short/Resistance) and Lower (Long/Support) bands.
Default Upper: 1.5 (Tighter trailing for Short positions)
Default Lower: 3.0 (Wider trailing for Long positions to avoid whipsaws)
Expanded MA Types: Added HULL (HMA) and VAR (Variable Index Dynamic Average) options.
VAR is highly recommended for filtering out noise in ranging markets.
HULL is ideal for scalping and faster reactions.
Built-in Risk Management: A fixed 5% Stop Loss mechanism is integrated into the strategy. It protects your capital by closing positions if the price moves 5% against you, even if the trend hasn't reversed yet.
Visibility Fix: Solved the issue where the PMax line would disappear or start at zero in the initial bars.
How to Use:
Use the VAR MA type for trend following in volatile markets.
Adjust the "Stop Loss Percent" input to fit your risk appetite.
The strategy employs an "Always In" logic (Long/Short) but respects the hard Stop Loss.
Credits: Original PMax logic by KivancOzbilgic.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.