OPEN-SOURCE SCRIPT
已更新 BTC Averages Strategy - Long & Short

strategy to sell and buy witht he crossing of two moving averages, one fast and other slow. THere is also a long average that works as a filter.
發行說明
Welcome to the BTC Triple SMA Trend Tracker, a robust, fully automated trend-following strategy designed to capture sustained market moves while filtering out the noise. Originally optimized for Bitcoin, this script utilizes a triple Simple Moving Average (SMA) system to align short-term momentum entries with the higher timeframe macro trend.Whether you are looking to ride the bull runs or capitalize on bear market drops, this strategy executes both Long and Short positions with clear, systematic rules.
🧠 How It Works
This strategy relies on three customizable Simple Moving Averages:
Fast MA (Default: 3): Tracks immediate price action and momentum.
Slow MA (Default: 48): Acts as the baseline for our momentum crossovers.
Trend MA (Default: 168): The macro filter. It determines the overall market regime (Bullish vs. Bearish).
Tip: If used on a 1-Hour chart, the defaults perfectly represent a 3-hour fast line, a 2-day slow line, and a 1-week macro trend!
⚙️ Trading Rules
🟢 Going Long:
Entry: The Fast MA crosses above the Slow MA AND the current closing price is above the Macro Trend MA.
Exit: The Fast MA crosses back below the Slow MA.
🔴 Going Short:
Entry: The Fast MA crosses below the Slow MA AND the current closing price is below the Macro Trend MA.
Exit: The Fast MA crosses back above the Slow MA.
📊 Visual Features
To make chart reading effortless, this script includes:
Clean MA Plots: Blue (Fast), Orange (Slow), and a thick White line (Macro Trend).
Dynamic Backgrounds: The chart background automatically paints a soft green when the price is above the Trend MA (Bull Regime) and soft red when below (Bear Regime), keeping you instantly aware of the broader market context.
🛠 Backtesting Ready
This script is built as a strategy() with realistic default parameters for backtesting:
Initial Capital: $10,000
Position Size: 99% of Equity (compounding)
Commission: 0.05% (Standard crypto exchange maker/taker fee)
*** Author's Note: Feel free to adjust the inputs in the settings menu to fit different timeframes or assets! If you find this strategy useful, drop a like and let me know your favorite settings in the comments. Happy trading! 📈
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。