OPEN-SOURCE SCRIPT
已更新 Universal Strategy Feed

User Manual: Universal Strategy Feed
The Universal Strategy Feed is a flexible Pine Script strategy designed to allow traders to backtest various technical entry signals and exit methodologies within a single, unified interface.
1. Overview
This script operates as a "meta-strategy." Instead of being hardcoded for a single indicator, it allows you to select from seven different signal types and customize how they trigger trades.
2. Configuration Settings
A. Signal Mode
The Signal Mode determines how the strategy identifies entry points. You can select the following modes:
Pulse: Uses a binary signal (+1/-1). Enters Long when Source A is positive, Short when negative.
Sign Cross: Enters Long when Source A crosses above a defined level, Short when it crosses below.
Level Cross: Traditional overbought/oversold logic (e.g., crossing 70/30 or 50/50).
Two Sources Cross: Compares two different indicators (e.g., crossing of two MAs or MACD vs. Signal line).
Two Trigger Sources: Simply checks if Source A (Long) or Source B (Short) is active.
Three Sources: Complex logic for combinations like KDJ or multi-MA filters.
Volume: Automatically detects volume spikes relative to an MA on green (buy) or red (sell) candles.
B. Sources
Source A/B/C: Select the specific indicator or price data (e.g., close, RSI, EMA) to act as the trigger for the selected Signal Mode.
Invert: A toggle to flip the logic (if you want to turn every buy signal into a sell, and vice versa).
C. Exits (TP/SL)
You can choose how to exit a trade using the TP/SL Method:
Signal: Exits only when the opposite signal is generated (Reversal mode).
Percent: Uses a fixed percentage for Take Profit and Stop Loss.
ATR: Uses Average True Range to set dynamic, volatility-based profit and loss targets.
D. Sizing & Filters
Contracts per trade: Sets the fixed quantity for each order.
Date Filter: Use this to restrict backtesting to a specific time window.
3. Quick Start Guide
Load the Strategy: Add the "Universal Strategy Feed" to your chart in TradingView.
Select a Mode: Open the script settings and choose the Signal Mode that matches the indicator you intend to use.
Define Sources: Assign the indicators you are using to Source A, B, and C.
Set Exit Criteria: Navigate to the Exits tab to define how you want to manage your risk (Percent or ATR is recommended for most users).
Review Performance: Use the Strategy Tester tab at the bottom of the TradingView interface to analyze the results.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Trading indicators:
tradingview.com/u/Options360/
tradingview.com/u/Options360/
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Trading indicators:
tradingview.com/u/Options360/
tradingview.com/u/Options360/
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。