PROTECTED SOURCE SCRIPT

XΩ — Trade Commander (Global)

19
1. What is XΩ — Trade Commander?
XΩ — Trade Commander (Global) is a post‑entry position management system.

It does not tell you where to enter. Instead, it helps you manage a trade after you are already in:

Dynamic Trailing Stop based on volatility (ATR)
Visual Safe Zone under price
R‑Multiple targets (1R, 2R, 3R) for profit‑taking
A live Position Dashboard with PnL and suggested actions
Exit alert when price breaks the Trailing Stop
Plus a ZERO GENESIS brand signature on the chart
Think of it as a trade commander / position guardian that enforces your risk and trailing rules.

2. Basic setup (Inputs)
In the Active Position Settings group:

Position Active?

Turn ON when you have a live position you want to manage.
Turn OFF when flat (no position), to effectively disable the management logic.
Avg Entry Price

Enter your average entry price (if you scaled in, use your weighted average).
This is the reference for all PnL and R calculations.
Initial Stop Loss

Your original invalidation price (hard stop) when you planned the trade.
Used to define:
The size of 1R (initial risk unit)
The locations of 1R, 2R, 3R targets.
Position Size (Units)

Size of your current position (number of shares/coins/contracts, etc.).
Used to convert PnL into currency value.
In the Trailing Stop Engine group:

Trailing Width (xATR)

Controls how tight/loose the trailing stop is:
Smaller value → tighter, closer to price (protects faster, more likely to get stopped out early)
Larger value → looser, farther from price (lets winners run, accepts more swing)
Source

Price source for the trailing engine:
AVA → smoothed price (reduces noise and “random” stop‑outs)
Close → closing price
High/Low → mid of high & low
In the Take Profit Targets (R-Multiples) group:

Show R-Levels
Turn ON to draw 1R, 2R, 3R reference lines on the chart.
Turn OFF if you prefer a cleaner chart.
3. How to read the indicator on the chart
Once Position Active? is ON and you’ve filled Avg Entry Price / Initial Stop Loss / Position Size, you’ll see:

3.1. Trailing Stop line (“The Shield”)
A blue/gray line below price (for long trades):
It only moves up, never down (ratchet‑style trailing).
When price rises → the trailing stop is adjusted upward.
When price falls → the trailing stop stays in place, not lowered.
Color:
Blue → price is still above the trailing stop (protected, trade is “alive”).
Gray → price is below the trailing stop (trailing has been violated).
Visually, this line is your dynamic protective shield.

3.2. Safe Zone (blue fill)
Light blue fill between price (chosen source) and the Trailing Stop line.
Represents your current buffer:
Thick Safe Zone → good distance to the stop → room for normal volatility.
Thin Safe Zone → close to stop → trade is at risk of being closed.
3.3. Entry & Hard Stop lines
Horizontal lines:
Entry Price → gray dotted line
Initial Stop Loss → solid red line
Helps you always see:
Where the trade started
Where the original invalidation was (your planned “I’m wrong here” level)
3.4. R‑Multiple Targets (1R, 2R, 3R)
When Show R-Levels is ON and Initial Stop Loss is set:

1R: dashed green line, labeled 1R
2R: dashed green line, labeled 2R
3R: dashed green line, labeled 3R (Target)
Use these for:

Planning partial take‑profits
Knowing when it’s reasonable to move your stop (e.g., to breakeven at 1R)
Evaluating your trade in terms of reward vs initial risk
3.5. “POSITION GUARDIAN” Dashboard label
Near the current price, you’ll see a label like:

Title: 🛡️ POSITION GUARDIAN
Inside:
Size: your position size and entry price
PnL: current profit/loss percentage and value (auto‑formatted, e.g. 1.23M, 45K, etc.)
R-Multiple: your current R (e.g., 0.7R, 1.5R, 3.2R)
TRAILING STOP: the current trailing stop price
ACTION: a suggested action string, for example:
🚫 TRAILING HIT -> EXIT NOW!
🚀 RUNNING PROFIT (x.xR) -> Hold or Trim
✅ IN PROFIT (x.xR) -> Move SL to BE
⚠️ DRAWDOWN -> Watch Trailing Stop
🟢 BREAKEVEN -> Holding
The text color changes (red, green, yellow, orange, etc.) to match the situation, so you can read your trade status at a glance.

4. How to use it in practice
Step 1 – Right after entering a trade
Open a position using your own entry strategy (Commander does not give entries).
On the TradingView chart:
Set Position Active? = true
Fill:
Avg Entry Price = your actual entry
Initial Stop Loss = your planned hard stop
Position Size = the size of your position
Adjust:
Trailing Width (xATR):
Lower for tight, short‑term trades (scalp/intraday).
Higher for swing/position trades to avoid premature exits.
Turn Show R-Levels ON if you trade in terms of R.
Now the script will start drawing the Trailing Stop, Safe Zone, R levels, and Dashboard.

Step 2 – While the trade is running
When price moves in your favor:

Track:
Your current R-Multiple
How much Safe Zone you have
Typical logic:
Once you reach ≥ 1R, consider moving your hard stop to breakeven (BE).
Around 2R–3R, consider:
Taking partial profits
Tightening the trailing
Letting the remainder run with the Shield.
When price pulls back:

If price breaks below the Trailing Stop:
Dashboard shows the red warning: TRAILING HIT -> EXIT NOW!
The alert (if enabled) will also fire.
→ This is your disciplined exit condition according to Commander.
When price hovers near entry:

Dashboard shows BREAKEVEN or DRAWDOWN.
You can:
Give the setup more time
Or decide to scratch the trade if it no longer fits your plan
(The key is: you’re deciding based on a clear snapshot, not pure emotion.)
5. Alerts
The script contains one key alert:

XΩ EXIT SIGNAL
Triggers when price crosses under the Trailing Stop.
Message: "Price breached Trailing Stop. Exit position immediately!"
Use this alert to automate your exit discipline: you don’t need to stare at the chart to know when your trailing stop is hit.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。