TrendMaster Pro 2.3 with Alerts — Strategy by everget

By alexgrover

Performance Metrics

Description

Jun 2Hello friends,A member of the community approached me and asked me how to write an indicator that would achieve a particular set of goals involving comprehensive trend analysis, risk management, and session-based trading controls. Here is one example method of how to create such a system:Core Strategy ComponentsMulti-Moving Average System - Uses configurable MA types (EMA, SMA, SMMA) with short-term (9) and long-term (21) periods for primary signal generation through crossoversHigher Timeframe Trend Filter - Optional trend confirmation using a separate MA (default 50-period) to ensure trades align with broader market directionBand Power Indicator - Dynamic high/low bands calculated using different MA types to identify price channels and volatility zonesAdvanced Signal FilteringBollinger Bands Volatility Filter - Prevents trading during low-volatility ranging markets by requiring sufficient band widthRSI Momentum Filter - Uses customizable thresholds (55 for longs, 45 for shorts) to confirm momentum directionMACD Trend Confirmation - Ensures MACD line position relative to signal line aligns with trade directionStochastic Oscillator - Adds momentum confirmation with overbought/oversold levelsADX Strength Filter - Only allows trades when trend strength exceeds 25 thresholdSession-Based Trading ManagementFour Trading Sessions - Asia (18:00-00:00), London (00:00-08:00), NY AM (08:00-13:00), NY PM (13:00-18:00)Individual Session Limits - Separate maximum trade counts for each session (default 5 per session)Automatic Session Closure - All positions close at specified market close timeRisk Management FeaturesMultiple Stop Loss Options - Percentage-based, MA cross, or band-based SL methodsRisk/Reward Ratio - Configurable TP levels based on SL distance (default 1:2)Auto-Risk Calculation - Dynamic position sizing based on dollar risk limits ($150-$250 range)Daily Limits - Stop trading after reaching specified TP or SL counts per daySupport & Resistance SystemMultiple Pivot Types - Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla calculationsFlexible Timeframes - Auto-adjusting or manual timeframe selection for S/R levelsHistorical Levels - Configurable number of past S/R levels to displayVisual Customization - Individual color and display settings for each S/R levelAdditional FeaturesAlert System - Customizable buy/sell alert messages with once-per-bar frequencyVisual Trade Management - Color-coded entry, SL, and TP levels with fill areasSession Highlighting - Optional background colors for different trading sessionsComprehensive Filtering - All signals must pass through multiple confirmation layers before executionThis approach demonstrates how to build a professional-grade trading system that combines multiple technical analysis methods with robust risk management and session-based controls, suitable for algorithmic trading across different market sessions.Good luck and stay safe!Jun 5Release Notes Added example slippage and commission for the presented In the code, there was a mention and usage of alexgrover's function from the following script: https://www.tradingview.com/script/gD1gDOyI-Intersection-Value-Functions/

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView