main
John Carter TTM TradingView Project
This repository contains Pine Script implementations of John Carter’s TTM Trend and TTM Squeeze indicators, adapted for TradingView.
It also includes crossover logic (8/18 SMA) and long-term trend filters (100 SMA).
📂 Project Structure
ttm_trend.pine→ Solid candle coloring (blue/red/gray) + SMA crossover signals.ttm_squeeze.pine→ Momentum histogram + squeeze dots (with adjustable size).ttm_strategy.pine→ Combined signals for backtesting entries/exits.README.md→ Documentation and usage notes.
⚙️ Default Settings (John Carter)
- TTM Squeeze
- Bollinger Bands: 20-period SMA, 2.0 StdDev
- Keltner Channels: 20-period SMA, 1.5 × ATR
- Histogram: 20-period linear regression
- TTM Trend
- Trend baseline: 20 SMA
- Candle colors: Blue (uptrend), Red (downtrend), Gray (neutral)
- Crossover
- Fast SMA: 8
- Slow SMA: 18
- Long-term SMA: 100 (white)
🚀 Usage
- Copy
.pinefiles into TradingView’s Pine Editor. - Add indicators to your chart:
- Overlay
ttm_trend.pineon price. - Add
ttm_squeeze.pinein a separate panel.
- Overlay
- Adjust inputs (lengths, multipliers) in the settings panel to match your trading style.
📈 Strategy Notes
- Buy Signal: 8 SMA crosses above 18 SMA, candles blue, squeeze fires.
- Sell Signal: 8 SMA crosses below 18 SMA, candles red, squeeze fires.
- Filter: Optional — only take signals aligned with the 100 SMA trend.
📝 Next Steps
- Add alerts for squeeze releases.
- Backtest combined signals in
ttm_strategy.pine. - Experiment with different lengths (e.g., 21, 30) for volatility adaptation.
Usage Notes
To get the best visual results when applying these indicators in TradingView:
-
Open Chart Settings
- Right‑click anywhere on the chart and select Settings.
-
Set Background to White
- In the Appearance tab, change the chart background color to White.
-
Configure Candles
- In the Symbol tab, set the chart type to Candles.
- Change candle body, wick, and border colors to White so the indicator coloring stands out clearly.
-
Hide Default Chart Elements
- At the top of the chart, click the eye icon to hide the default overlay.
- This ensures only the indicator’s custom colors and signals are visible.
After these adjustments, paste the Pine Script into the Pine Editor, click Add to Chart, and you’ll see the clean indicator visuals as intended.