OPEN-SOURCE SCRIPT

Long-Only For SPX

115
The "GOATED Long-Only" TradingView strategy, written in Pine Script v5, is designed for long-term momentum trading with a $50 initial capital. It identifies high-momentum stocks by calculating a composite momentum score across 3-month (63 days), 6-month (126 days), 9-month (189 days), and 12-month (252 days) periods, using the formula (current_price / past_price) - 1. The strategy filters stocks with annualized volatility below 0.5 (calculated as the standard deviation of daily returns, annualized by multiplying by the square root of 252 trading days) and requires momentum to exceed a customizable threshold (default 0.0). It enters long positions when momentum becomes positive and exits when it turns negative, using stop-loss (1%) and take-profit (50%) levels to manage risk. The strategy visualizes momentum and volatility on the chart, plotting entry/exit signals as green triangles (long entry) and red triangles (long exit) for backtesting and analysis.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。