PROTECTED SOURCE SCRIPT

MangAlgo X-V6

145
1. Overview & Purpose

The MangAlgo X-V6 script is a multi-component indicator designed to generate buy and sell signals on TradingView charts by combining several technical analysis techniques. It is tailored for various trading styles – including Scalping, Day Trading, and the custom MangAlgo approach – by automatically adjusting parameters based on the selected preset. The primary goal of the script is to deliver more accurate signals by integrating additional filters and a robust trade management system.



2. Key Features
• Trading Style Presets
• Three preset options: Scalping, Day Trading, and MangAlgo.
• The selected preset automatically adjusts key parameters such as Moving Average (MA) lengths, additional MA filters, and other settings to suit the trading style.
• SL/TP Settings (Stop Loss / Take Profit)
• Adjustable ATR multiplier for calculating the stop loss (SL).
• Multi-level TP (up to 5 levels) based on a configurable risk-reward ratio.
• Multiple Moving Average Types
• Supports various MA types: SMA, EMA, WMA, or VWMA (default is based on conditions).
• Two sets of MAs:
• Fast and Slow MAs for detecting crossovers as primary signals.
• Additional MA Filters (three additional MAs) used as further confirmation.
• Higher Timeframe Filter (HTF)
• Incorporates a moving average from a higher timeframe to provide broader trend context.
• The HTF MA is smoothed using SMA to ensure a stable trend indication.
• SuperTrend Indicator
• Calculates the SuperTrend level using ATR and a configurable multiplier (“Magic Number Factor”).
• Displays a dynamic trend line that changes color: green for an uptrend and red for a downtrend.
• Momentum & Candle Size Filters
• The momentum filter measures price strength using a momentum function over a set period.
• Optional candle size filtering allows you to disregard signals based on minimum and maximum candle sizes to reduce market noise.
• Session Filters
• Optionally filter signals based on trading sessions (New York, London, Tokyo, Sydney) to avoid low-liquidity periods.
• Directional Movement Index (DI)
• Computes DI+ and DI– using a smoothed True Range.
• Acts as an additional filter: a buy signal is valid if DI+ is greater than DI–, and vice versa for sell signals.
• Trade Signal Execution & Management
• Entry Signals:
• Buy: Triggered when the fast MA crosses above the slow MA, supported by SuperTrend, HTF MA, additional MAs, momentum, and DI confirmation (DI+ > DI–).
• Sell: Triggered when the fast MA crosses below the slow MA with corresponding filter confirmations (DI– > DI+).
• SL and TP Setup:
• The stop loss is computed using ATR and adjusted with a trailing SL as take profit levels are reached.
• TP levels (up to 5) are calculated based on the initial risk and a configurable risk-reward ratio.
• Visual Signal & Trade Outcome Display:
• Displays “𝗕𝗨𝗬” and “𝗦𝗘𝗟𝗟” labels on the chart when signals are active.
• Additional labels indicate SL and TP levels and whether the trade outcome was a win or loss once the SL is hit.
• Logging & Trade Statistics (Optional)
• Internal logging records trade details for each confirmed candle, helping you review strategy performance.
• An optional table display shows a summary of trade counts, win/loss results, and win rate percentages.
• Custom Candle Plotting
• Instead of using the standard barcolor(), the script uses plotcandle() to color the candles based on the active trade status:
• Green: Indicates an active buy position.
• Blue: Indicates an active sell position.
• Default colors: When no trade is active.



3. How It Works & Component Interaction
1. Preset Trading Style Selection:
• Users choose a trading style preset via the input, which sets the values for key parameters such as the type and length of MAs, additional filters, and more.
2. Core Technical Calculations:
• ATR Calculation: Used for range detection and setting the stop loss.
• Moving Averages: Computed through a custom function (f_ma()) based on the chosen MA type.
• Range Detection: The script identifies price ranges by comparing the price to the MA, visualizing the range with boxes and lines.
3. Trend Filtering & Signal Confirmation:
• SuperTrend: Computed using ATR and a multiplier to dynamically generate support/resistance levels.
• Higher Timeframe MA: Provides macro trend context by analyzing a higher timeframe’s data.
• Additional MA & Momentum Filters: Ensure that the price movement is not mere noise, but confirmed by extra layers of filtering.
• DI (Directional Movement): Validates entry signals by ensuring that the directional momentum (DI+) dominates for buys and DI– for sells.
4. Signal Execution & Trade Management:
• When all conditions are met (including session filtering and non-range conditions), a buy or sell signal is activated.
• Upon signal activation, a trade is initiated with a calculated SL and multiple TP levels based on risk parameters.
• As the price reaches a TP level, the script adjusts the stop loss (trailing SL) to lock in gains.
• Trade outcomes (win or lose) are visually labeled on the chart after the SL is hit.
5. Visualization & Logging:
• Trading signals and SL/TP levels are plotted on the chart.
• Custom candle plotting highlights active trades by altering candle colors.
• Trade logging captures detailed information for each candle, which can be used for performance evaluation.



4. How to Use the Script
• Initial Setup:
• Select your preferred trading style preset (e.g., Scalping, Day Trading, or MangAlgo).
• Adjust additional input parameters if needed, such as the ATR multiplier, number of TPs, or session filters.
• Interpreting Signals:
• Look for “𝗕𝗨𝗬” and “𝗦𝗘𝗟𝗟” labels on the chart as indicators of entry points.
• Use the plotted SL and TP levels as guides for risk management.
• Utilizing Additional Filters:
• Optionally enable the candle size filter and session filters to reduce false signals.
• Regularly monitor the chart and remember that this indicator is a tool that combines multiple technical methods for better signal accuracy.
• Trade Management:
• Use the provided trade outcome labels and logging information to assess and refine your strategy over time.
• If activated, review the trade summary table to analyze overall performance statistics.



5. Risk Disclaimer

Trading involves significant risk and may not be suitable for all investors.
The MangAlgo X-V6 script is provided for educational and informational purposes only. Past performance is not indicative of future results. Trading decisions based on this script are at the sole discretion of the user, and the creator or distributor of the script is not responsible for any financial losses incurred. Always perform your own analysis, use proper risk management techniques, and consult with a professional financial advisor if necessary.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.