Files
2026-04-09 14:16:26 +08:00

1.7 KiB
Raw Permalink Blame History

John Carter TTM TradingView Project

This repository contains Pine Script implementations of John Carters 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

  1. Copy .pine files into TradingViews Pine Editor.
  2. Add indicators to your chart:
    • Overlay ttm_trend.pine on price.
    • Add ttm_squeeze.pine in a separate panel.
  3. 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.