# Trinity Machine Learning Enhanced Projection - User Guide
## Overview
This indicator uses quadratic regression (machine learning) to project future price paths based on historical price action. It incorporates multiple filters to improve prediction accuracy, including volume analysis, trend detection, volatility adjustments, and confidence scoring.
## Getting Started
### How to Add the Indicator 1. Open TradingView and load your preferred chart 2. Click the "Pine Editor" tab at the bottom 3. Paste the complete code into the editor 4. Click "Save" and name your indicator 5. Click "Add to Chart" to apply it
## Main Settings Explained
### Historical Data Length **Default: 50 candles** Controls how many past candles the algorithm analyzes. Lower values make the projection more responsive to recent price action. Higher values smooth out noise but may lag behind rapid changes. For day trading, 30-50 works well. For swing trading, consider 80-100.
### Projection Candles **Default: 20 candles** Determines how far into the future the indicator projects. More candles give you a longer-term view but become less reliable. For most traders, 10-20 candles provides a good balance. The projection appears as dashed lines extending to the right of the current candle.
### Projection Colors **Default: Green (up) and Red (down)** Customize the colors for upward and downward projections. Green typically indicates bullish projections, red indicates bearish projections.
### Line Width **Default: 2** Adjust the thickness of the projection lines. Thicker lines are easier to see but may clutter the chart.
This filter adds confidence bands around your projection based on the Average True Range (ATR), which measures market volatility.
**ATR Multiplier** - Default: 1.5 Higher values create wider bands. Use wider bands during volatile markets, narrower bands during calm markets. The bands show you the potential range of price movement around the projection.
**Dynamic ATR Scaling** - Default: Enabled Automatically adjusts the bands based on current volatility compared to historical volatility. When volatility increases, the bands expand. When volatility decreases, they contract.
**ATR Comparison Period** - Default: 50 candles Determines the baseline for comparison. A shorter period makes the bands more responsive to recent volatility changes.
**Trading Tip:** When price moves outside the band limits, it suggests the projection may be breaking down and you should reassess your trade.
### Volume Delta Filter **Default: Enabled**
Analyzes buying vs. selling pressure from the last few candles to adjust projections.
**Volume Lookback** - Default: 10 candles Controls how many candles are analyzed for volume patterns. Short periods (5-10) work well for day trading. Longer periods (15-20) for swing trading.
**Volume Impact %** - Default: 5% Controls how much volume influences the projection. Higher values give volume more weight. If you trade high-volume assets, increase this to 8-10%. For low-volume assets, decrease to 2-3%.
**Trading Tip:** Strong bullish volume with an upward projection confirms the move. Bearish volume against an upward projection suggests caution.
### EMA Trend Filter **Default: Enabled**
Uses Exponential Moving Average to determine market direction and adjusts projections accordingly.
**EMA Length** - Default: 50 candles Shorter EMAs (20-30) are more responsive and good for short-term trading. Longer EMAs (100-200) are better for identifying major trends.
**Counter-Trend Reduction %** - Default: 50% When price moves against the main trend, this setting reduces the projection. At 50%, counter-trend moves are cut in half. At 100%, they're completely eliminated. At 0%, they're fully projected.
**Trading Tip:** Always check the EMA trend before entering trades. Projections that align with the EMA direction are more reliable.
### RSI Filter **Default: Disabled**
Uses the Relative Strength Index to adjust projections when overbought or oversold conditions exist.
**RSI Length** - Default: 14 candles Standard RSI setting. Lower values (7-9) create more frequent signals. Higher values (20-30) create fewer but potentially stronger signals.
**RSI Overbought/Oversold** - Default: 70/30 Standard levels. In strong trends, consider raising overbought to 80 and lowering oversold to 20.
**Trading Tip:** When RSI is overbought and the projection goes up, expect resistance. When RSI is oversold and the projection goes down, expect support.
Prevents projections from moving through major support and resistance levels.
**S/R Lookback** - Default: 50 candles Determines how far back to look for pivot points. Longer periods identify stronger, more significant levels.
**Trading Tip:** Use this filter to identify where projections are likely to reverse. Look for confluence between projected levels and historical support/resistance.
Shows a statistical measure of how well the projection fits historical data. Higher scores mean more reliable projections.
**Confidence Scale:** - Above 70%: High confidence (green) - Strong projection - 40-70%: Medium confidence (orange) - Moderate reliability - Below 40%: Low confidence (red) - Use with caution
**Min Confidence Threshold** - Default: 0.5 (50%) When confidence falls below this level, the projection becomes more transparent or hidden entirely. Increase this value if you only want to see high-confidence projections. Decrease it if you want to see projections even when confidence is low.
**Trading Tip:** Only take trades when confidence is above 60-70%. Low confidence projections often fail.
### Confidence Bands **Default: Enabled**
Shows the ATR-based volatility bands alongside the projection.
**Band Frequency** - Default: 5 candles Determines how often bands appear. A value of 5 means bands appear every 5 projected candles. Higher values reduce chart clutter.
### Labels **Default: Enabled**
Shows additional information on the chart.
**Label Size** - Default: Small Options: Tiny, Small, Normal, Large Choose based on your screen size and visual preference.
Information displayed includes: - Upper and lower band levels - R-squared confidence percentage - Current ATR value - Volume ratio (bullish vs bearish volume) - Volatility factor (when dynamic ATR is enabled)
## Weighted Regression Settings
### Use Weighted Regression **Default: Enabled**
Gives more importance to recent candles compared to older ones. This makes the projection more responsive to current market conditions.
**Weight Strength** - Default: 1.0 Higher values (1.5-2.0) make recent candles much more important. Lower values (0.1-0.5) treat all candles more equally. Use higher values for fast-moving markets, lower values for stable markets.
## Practical Trading Strategies
### Strategy 1: Trend Following 1. Enable EMA Trend Filter 2. Wait for projection to align with EMA direction 3. Enter when projection shows continuation (same direction) 4. Target: The upper band for long positions, lower band for short positions 5. Confidence should be above 60%
### Strategy 2: Reversal Trading 1. Enable RSI Filter and Support/Resistance Filter 2. Look for overbought/oversold conditions combined with projection reversal 3. Enter when projection changes direction and breaks S/R levels 4. Target: Return to EMA level 5. Higher confidence (70%+) is especially important for reversals
### Strategy 3: Breakout Confirmation 1. Enable Volume Delta and EMA Trend filters 2. Look for strong volume and projection breakout above resistance or below support 3. Volume ratio should be above 60-70% in the direction of the breakout 4. Target: 2-3x ATR distance 5. Confidence level: 65% minimum
## Troubleshooting
### No Projection Lines Appearing - Check that "Show Confidence" is enabled - Check the confidence threshold - if set too high, low-confidence projections won't display - Increase the projection candles setting
### Lines Too Jumpy or Erratic - Increase the Historical Data Length - Reduce the Weight Strength - Disable Weighted Regression - Increase the EMA Length for smoother trend detection
### Projection Seems Too Aggressive - Reduce Volume Impact percentage - Increase Counter-Trend Reduction - Enable and adjust RSI Filter to dampen extreme moves - Check if Dynamic ATR is too aggressive - consider disabling it
### Indicator Slow to Respond - Reduce the Historical Data Length - Reduce the Projection Candles - Disable Weighted Regression (slightly faster) - Turn off some filters you don't use ## Important Limitations
**The projection is a statistical estimate based on historical patterns, not a guarantee of future price movement.** Always use proper risk management and combine this indicator with other analysis methods.
**Best Used On:** - Liquid markets (forex, large-cap stocks, major cryptocurrencies) - Timeframes between 1-minute and 1-hour - Markets with clear trends and consistent volume
**Not Recommended For:** - Extremely low-volume assets - News-driven markets with unpredictable spikes - Timeframes below 1-minute (too much noise)
## Pro Tips
1. **Start with defaults** - The indicator comes optimized for most markets. Change one setting at a time to understand its effect.
2. **Watch the confidence score** - This is your primary filter for trade quality. A high confidence projection with a lower price target is better than a low confidence projection with a huge target.
3. **Combine with price action** - Don't ignore candlestick patterns. A bullish projection with a bullish candlestick pattern (like a hammer or engulfing) is very powerful.
4. **Use multiple timeframes** - Check the projection on higher timeframes for context. A bullish projection on 5-minute is stronger when the 1-hour shows a similar projection.
5. **Volume confirmation matters** - Strong volume in the projected direction significantly increases the probability of success.
All Comments0LatestHot