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.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.