OPEN-SOURCE SCRIPT
Cập nhật 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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Trading indicators:
tradingview.com/u/Options360/
tradingview.com/u/Options360/
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Trading indicators:
tradingview.com/u/Options360/
tradingview.com/u/Options360/
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.