OPEN-SOURCE SCRIPT
Mars Signals - Ultimate Institutional Suite v3.0(Joker)

Comprehensive Trading Manual
Mars Signals – Ultimate Institutional Suite v3.0 (Joker)
## Chapter 1 – Philosophy & System Architecture
This script is not a simple “buy/sell” indicator.
Mars Signals – UIS v3.0 (Joker) is designed as an institutional-style analytical assistant that layers several methodologies into a single, coherent framework.
The system is built on four core pillars:
1. Smart Money Concepts (SMC)
2. Smart DCA Strategy
3. Volume Profile (Visible Range Simulation)
4. Wyckoff Helper – Spring
All four pillars feed into a Confluence Engine (Scoring System).
The final output is presented in the Dashboard, with a clear, human-readable signal:
This allows the trader to see *how many* and *which* layers of the system support a bullish or bearish bias at any given time.
## Chapter 2 – Settings Overview
### 2.1 General & Dashboard Group
- Show Dashboard Panel (`show_dash`)
Turns the dashboard table in the corner of the chart ON/OFF.
- Show Signal Recommendation (`show_rec`)
- Dashboard Position (`dash_pos`)
Determines where the dashboard appears on the chart:
### 2.2 Smart Money (SMC) Group
- Enable SMC Strategy (`show_smc`)
Globally enables or disables the Order Block and FVG logic.
- Order Block Pivot Lookback (`ob_period`)
Main parameter for detecting key pivot highs/lows (swing points).
- Default value: 5
- Concept:
A bar is considered a pivot low if its low is lower than the lows of the previous 5 and the next 5 bars.
Similarly, a pivot high has a high higher than the previous 5 and the next 5 bars.
These pivots are used as anchors for Order Blocks.
- Increasing `ob_period`:
- Fewer levels.
- But levels tend to be more significant and reliable.
- In highly volatile markets (major news, war events, FOMC, etc.),
using values 7–10 is recommended to filter out weak levels.
- Show Fair Value Gaps (`show_fvg`)
Enables/disables the drawing of FVG zones (imbalances).
- Bullish OB Color (`c_ob_bull`)
- Color of Bullish Order Blocks (Demand Zones).
- Default: semi-transparent green (transparency ≈ 80).
- Bearish OB Color (`c_ob_bear`)
- Color of Bearish Order Blocks (Supply Zones).
- Default: semi-transparent red.
- Bullish FVG Color (`c_fvg_bull`)
- Color of Bullish FVG (upward imbalance), typically yellow.
- Bearish FVG Color (`c_fvg_bear`)
- Color of Bearish FVG (downward imbalance), typically purple.
### 2.3 Smart DCA Strategy Group
- Enable DCA Zones (`show_dca`)
Enables the Smart DCA logic and visual labels.
- RSI Length (`rsi_len`)
Lookback period for RSI (default: 14).
- Shorter → more sensitive, more noise.
- Longer → fewer signals, higher reliability.
- Bollinger Bands Length (`bb_len`)
Moving average period for Bollinger Bands (default: 20).
- BB Multiplier (`bb_mult`)
Standard deviation multiplier for Bollinger Bands (default: 2.0).
- For extremely volatile markets, values like 2.5–3.0 can be used so that only extreme deviations trigger a DCA signal.
### 2.4 Volume Profile (Visible Range Sim) Group
- Show Volume Profile (`show_vp`)
Enables the simulated Volume Profile bars on the right side of the chart.
- Volume Lookback Bars (`vp_lookback`)
Number of bars used to compute the Volume Profile (default: 150).
- Higher values → broader historical context, heavier computation.
- Row Count (`vp_rows`)
Number of vertical price segments (rows) to divide the total price range into (default: 30).
- Width (%) (`vp_width`)
Relative width of each volume bar as a percentage.
In the code, bar widths are scaled relative to the row with the maximum volume.
> Technical note: Volume Profile calculations are executed only on the last bar (`barstate.islast`) to keep the script performant even on higher timeframes.
### 2.5 Wyckoff Helper Group
- Show Wyckoff Events (`show_wyc`)
Enables detection and plotting of Wyckoff Spring events.
- Volume MA Length (`vol_ma_len`)
Length of the moving average on volume.
A bar is considered to have Ultra Volume if its volume is more than 2× the volume MA.
## Chapter 3 – Smart Money Strategy (Order Blocks & FVG)
### 3.1 What Is an Order Block?
An Order Block (OB) represents the footprint of large institutional orders:
- Bullish Order Block (Demand Zone)
The last selling region (bearish candle/cluster) before a strong upward move.
- Bearish Order Block (Supply Zone)
The last buying region (bullish candle/cluster) before a strong downward move.
Institutions and large players place heavy orders in these regions. Typical price behavior:
- Price moves away from the zone.
- Later returns to the same zone to fill unfilled orders.
- Then continues the larger trend.
In the script:
- If `pl` (pivot low) forms → a Bullish OB is created.
- If `ph` (pivot high) forms → a Bearish OB is created.
The box is drawn:
- From `bar_index[ob_period]` to `bar_index`.
- Between `low[ob_period]` and `high[ob_period]`.
- `extend=extend.right` extends the OB into the future, so it acts as a dynamic support/resistance zone.
- Only the last 4 OB boxes are kept to avoid clutter.
### 3.2 Order Block Color Guide
- Semi-transparent Green (`c_ob_bull`)
- Represents a Bullish Order Block (Demand Zone).
- Interpretation: a price region with a high probability of bullish reaction.
- Semi-transparent Red (`c_ob_bear`)
- Represents a Bearish Order Block (Supply Zone).
- Interpretation: a price region with a high probability of bearish reaction.
Overlap (Multiple OBs in the Same Area)
When two or more Order Blocks overlap:
- The shared area appears visually denser/stronger.
- This suggests higher order density.
- Such zones can be treated as high-priority levels for entries, exits, and stop-loss placement.
### 3.3 Demand/Supply Logic in the Scoring Engine
Pine Script®
- If current price is near the lowest lows of the last 20 bars, it is considered in a Demand Zone → positive impact on score.
- If current price is near the highest highs of the last 20 bars, it is considered in a Supply Zone → negative impact on score.
This logic complements Order Blocks and helps the Dashboard distinguish whether:
- Market is currently in a statistically cheap (long-friendly) area, or
- In a statistically expensive (short-friendly) area.
### 3.4 Fair Value Gaps (FVG)
#### Concept
When the market moves aggressively:
- Some price levels are skipped and never traded.
- A gap between wicks/shadows of consecutive candles appears.
- These regions are called Fair Value Gaps (FVGs) or Imbalances.
The market generally “dislikes” imbalance and often:
- Returns to these zones in the future.
- Fills the gap (rebalance).
- Then resumes its dominant direction.
#### Implementation in the Code
Bullish FVG (Yellow)
Pine Script®
Core condition:
`low > high[2]` → the current low is above the high of two bars ago; the space between them is an untraded gap.
Bearish FVG (Purple)
fvg_bear_cond = show_smc and show_fvg and high < low[2] and close[1] < low[2]
if fvg_bear_cond
box.new(bar_index[2], low[2], bar_index, high, ...)
Core condition:
`high < low[2]` → the current high is below the low of two bars ago; again a price gap exists.
#### FVG Color Guide
- Transparent Yellow (`c_fvg_bull`) – Bullish FVG
Often acts like a magnet for price:
- Price tends to retrace into this zone,
- Fill the imbalance,
- And then continue higher.
- Transparent Purple (`c_fvg_bear`) – Bearish FVG
Price tends to:
- Retrace upward into the purple area,
- Fill the imbalance,
- And then resume downward movement.
#### Trading with FVGs
- FVGs are *not* standalone entry signals.
They are best used as:
- Targets (take-profit zones), or
- Reaction areas where you expect a pause or reversal.
Examples:
- If you are long, a bearish FVG above is often an excellent take-profit zone.
- If you are short, a bullish FVG below is often a good cover/exit zone.
### 3.5 Core SMC Trading Templates
#### Reversal Long
1. Price trades down into a green Order Block (Demand Zone).
2. A bullish confirmation candle (Close > Open) forms inside or just above the OB.
3. If this zone is close to or aligned with a bullish FVG (yellow), the signal is reinforced.
4. Entry:
- At the close of the confirmation candle, or
- Using a limit order near the upper boundary of the OB.
5. Stop-loss:
- Slightly below the OB.
- If the OB is broken decisively and price consolidates below it, the zone loses validity.
6. Targets:
- The next FVG,
- Or the next red Order Block (Supply Zone) above.
#### Reversal Short
The mirror scenario:
- Price rallies into a red Order Block (Supply).
- A bearish confirmation candle forms (Close < Open).
- FVG/premium structure above can act as a confluence.
- Stop-loss goes above the OB.
- Targets: lower FVGs or subsequent green OBs below.
## Chapter 4 – Smart DCA Strategy (RSI + Bollinger Bands)
### 4.1 Smart DCA Concept
- Classic DCA = buying at fixed time intervals regardless of price.
- Smart DCA = scaling in only when:
- Price is statistically cheaper than usual, and
- The market is in a clear oversold condition.
Code logic:
Pine Script®
Conditions:
- DCA Buy – Smart Scale-In Zone
- RSI < 30 → oversold.
- Close < lower Bollinger Band → price has broken below its typical volatility envelope.
- DCA Sell – Overbought/Distribution Zone
- RSI > 70 → overbought.
- Close > upper Bollinger Band → price is extended far above the mean.
### 4.2 Visual Representation on the Chart
- Green “DCA” Label Below Candle
- Shape: `labelup`.
- Color: lime background, white text.
- Meaning: statistically attractive level for laddered spot entries or short exits.
- Red “SELL” Label Above Candle
- Warning that the market is in an extended, overbought condition.
- Suitable for profit-taking on longs or considering short entries (with proper confluence and risk management).
- Light Green Background (`bgcolor`)
- When `dca_buy` is true, the candle background turns very light green (high transparency).
- This helps visually identify DCA Zones across the chart at a glance.
### 4.3 Practical Use in Trading
#### Spot Trading
Used to build a better average entry price:
- Every time a DCA label appears, allocate a fixed portion of capital (e.g., 2–5%).
- Combining DCA signals with:
- Green OBs (Demand Zones), and/or
- The Volume Profile POC
makes the zone structurally more important.
#### Futures Trading
- Longs
- Use DCA Buy signals as low-risk zones for opening or adding to longs when:
- Price is inside a green OB, or
- The Dashboard already leans LONG.
- Shorts
- Use DCA Sell signals as:
- Exit zones for longs, or
- Areas to initiate shorts with stops above structural highs.
## Chapter 5 – Volume Profile (Visible Range Simulation)
### 5.1 Concept
Traditional volume (histogram under the chart) shows volume over time.
Volume Profile shows volume by price level:
- At which prices has the highest trading activity occurred?
- Where did buyers and sellers agree the most (High Volume Nodes – HVNs)?
- Where did price move quickly due to low participation (Low Volume Nodes – LVNs)?
### 5.2 Implementation in the Script
Executed only when `show_vp` is enabled and on the last bar:
1. The last `vp_lookback` bars (default 150) are processed.
2. The minimum low and maximum high over this window define the price range.
3. This price range is divided into `vp_rows` segments (e.g., 30 rows).
4. For each row:
- All bars are scanned.
- If the mid-price `(high[j] + low[j]) / 2` falls inside a row, that bar’s volume is added to the row total.
5. The row with the greatest volume is stored as `max_vol_idx` (the POC row).
6. For each row, a volume box is drawn on the right side of the chart.
### 5.3 Color Scheme
- Semi-transparent Orange
- The row with the maximum volume – the Point of Control (POC).
- Represents the strongest support/resistance level from a volume perspective.
- Semi-transparent Blue
- Other volume rows.
- The taller the bar → the higher the volume → the stronger the interest at that price band.
### 5.4 Trading Applications
- If price is above POC and retraces back into it:
→ POC often acts as support, suitable for long setups.
- If price is below POC and rallies into it:
→ POC often acts as resistance, suitable for short setups or profit-taking.
HVNs (Tall Blue Bars)
- Represent areas of equilibrium where the market has spent time and traded heavily.
- Price tends to consolidate here before choosing a direction.
LVNs (Short or Nearly Empty Bars)
- Represent low participation zones.
- Price often moves quickly through these areas – useful for targeting fast moves.
## Chapter 6 – Wyckoff Helper – Spring
### 6.1 Spring Concept
In the Wyckoff framework:
- A Spring is a false break of support.
- The market briefly trades below a well-defined support level, triggers stop losses,
then sharply reverses upward as institutional buyers absorb liquidity.
This movement:
### 6.2 Code Logic
Conditions for a Spring:
1. The current low is lower than the lowest low of the previous 50 bars
→ apparent break of a long-standing support.
2. The bar closes bullish (Close > Open)
→ the breakdown was rejected.
3. Volume is significantly elevated:
→ `volume > 2 × volume_MA` (Ultra Volume).
When all conditions are met and `show_wyc` is enabled:
- A pink diamond is plotted below the bar,
- With the label “Spring” – one of the strongest long signals in this system.
### 6.3 Trading Use
- After a valid Spring, markets frequently enter a meaningful bullish phase.
- The highest quality setups occur when:
- The Spring forms inside a green Order Block, and
- Near or on the Volume Profile POC.
Entries:
- At the close of the Spring bar, or
- On the first pullback into the mid-range of the Spring candle.
Stop-loss:
- Slightly below the Spring’s lowest point (wick low plus a small buffer).
## Chapter 7 – Confluence Engine & Dashboard
### 7.1 Scoring Logic
For each bar, the script:
1. Resets `score` to 0.
2. Adjusts the score based on different signals.
SMC Contribution
Pine Script®
- Being in Demand → `+1`
- Being in Supply → `-1`
DCA Contribution
Pine Script®
- DCA Buy → `+2` (strong, statistically driven long signal)
- DCA Sell → `-2`
Wyckoff Spring Contribution
Pine Script®
- Spring → `+2` (entry of strong money)
### 7.2 Mapping Score to Dashboard Signal
### 7.3 Dashboard Structure
The dashboard is a two-column table:
- Row 0
- Row 1
- Row 2
- Column 0: `"SMC:"`
- Column 1:
- Row 3
- Column 0: `"DCA:"`
- Column 1:
- Row 4
## Chapter 8 – Visual Legend (Colors, Shapes & Actions)
For quick reading inside TradingView, the visual elements are described line by line instead of a table.
Chart Element: Green Box
Color / Shape: Transparent green rectangle
Core Meaning: Bullish Order Block (Demand Zone)
Suggested Trader Response: Look for longs, Smart DCA adds, closing or reducing shorts.
Chart Element: Red Box
Color / Shape: Transparent red rectangle
Core Meaning: Bearish Order Block (Supply Zone)
Suggested Trader Response: Look for shorts, or take profit on existing longs.
Chart Element: Yellow Area
Color / Shape: Transparent yellow zone
Core Meaning: Bullish FVG / upside imbalance
Suggested Trader Response: Short take-profit zone or expected rebalance area.
Chart Element: Purple Area
Color / Shape: Transparent purple zone
Core Meaning: Bearish FVG / downside imbalance
Suggested Trader Response: Long take-profit zone or temporary supply region.
Chart Element: Green "DCA" Label
Color / Shape: Green label with white text, plotted below the candle
Core Meaning: Smart ladder-in buy zone, DCA buy opportunity
Suggested Trader Response: Spot DCA entry, partial short exit.
Chart Element: Red "SELL" Label
Color / Shape: Red label with white text, plotted above the candle
Core Meaning: Overbought / distribution zone
Suggested Trader Response: Take profit on longs, consider initiating shorts.
Chart Element: Light Green Background (bgcolor)
Color / Shape: Very transparent light-green background behind bars
Core Meaning: Active DCA Buy zone
Suggested Trader Response: Treat as a discount zone on the chart.
Chart Element: Orange Bar on Right
Color / Shape: Transparent orange horizontal bar in the volume profile
Core Meaning: POC – price with highest traded volume
Suggested Trader Response: Strong support or resistance; key reference level.
Chart Element: Blue Bars on Right
Color / Shape: Transparent blue horizontal bars in the volume profile
Core Meaning: Other volume levels, showing high-volume and low-volume nodes
Suggested Trader Response: Use to identify balance zones (HVN) and fast-move corridors (LVN).
Chart Element: Pink "Spring" Diamond
Color / Shape: Pink diamond with white text below the candle
Core Meaning: Wyckoff Spring – liquidity grab and potential major bullish reversal
Suggested Trader Response: One of the strongest long signals in the suite; look for high-quality long setups with tight risk.
Chart Element: STRONG LONG in Dashboard
Color / Shape: Green background, white text in the Signal row
Core Meaning: Multiple bullish layers in confluence
Suggested Trader Response: Consider initiating or increasing longs with strict risk management.
Chart Element: STRONG SHORT in Dashboard
Color / Shape: Red background, white text in the Signal row
Core Meaning: Multiple bearish layers in confluence
Suggested Trader Response: Consider initiating or increasing shorts with a logical, well-placed stop.
## Chapter 9 – Timeframe-Based Trading Playbook
### 9.1 Timeframe Selection
- Scalping
- Day Trading
- Swing Trading & Position Investing
### 9.2 Scenario A – Scalping Long
Example: 5-Minute Chart
1. Price is declining into a green OB (Bullish Demand).
2. A candle with a long lower wick and bullish close (Pin Bar / Rejection) forms inside the OB.
3. A Spring diamond appears below the same candle → very strong confluence.
4. The Dashboard shows at least WEAK LONG ↗, ideally STRONG LONG 🚀.
5. Entry:
6. Stop-loss:
7. Targets:
### 9.3 Scenario B – Day-Trading Short
Recommended Timeframes: 1H or 4H
1. The market completes a strong impulsive move upward.
2. Price enters a red Order Block (Supply).
3. In the same zone, a purple FVG appears or remains unfilled.
4. On a lower timeframe (e.g., 15M), RSI enters overbought territory and a DCA Sell signal appears.
5. The main timeframe Dashboard (1H) shows WEAK SHORT ↘ or STRONG SHORT 🩸.
Trade Plan
- Open a short near the upper boundary of the red OB.
- Place the stop above the OB or above the last swing high.
- Targets:
### 9.4 Scenario C – Swing / Investment with Smart DCA
Timeframes: Daily / Weekly
1. On the daily or weekly chart, each time a green “DCA” label appears:
2. Check whether this DCA zone aligns with the orange POC of the Volume Profile:
3. If the DCA signal sits inside a daily green OB, the probability of a medium-term bottom increases.
4. Always build the position laddered, never all-in at a single price.
Exits for investors:
### 9.5 Case Study 1 – BTCUSDT (15-Minute)
Plan
### 9.6 Case Study 2 – Meme Coin (PEPE – 4H)
Plan
## Chapter 10 – Risk Management, Psychology & Advanced Tuning
### 10.1 Risk Management
No signal, regardless of its strength, replaces risk control.
Recommendations:
- In futures, do not expose more than 1–3% of account equity to risk per trade.
- Adjust leverage to the volatility of the instrument (lower leverage for highly volatile altcoins).
- Place stop-losses in zones where the idea is clearly invalidated:
- Below/above the relevant Order Block or Spring, not randomly in the middle of the structure.
### 10.2 Market-Specific Parameter Tuning
- Calmer Markets (e.g., major FX pairs)
- Highly Volatile Markets (Crypto, news-driven assets)
### 10.3 Trading Psychology
- STRONG LONG 🚀 does not mean “risk-free”.
It means the probability of a successful long, given the model’s logic, is higher than average.
- Treat Mars Signals as a confirmation and context system, not a full replacement for your own decision-making.
- Example of disciplined thinking:
## Chapter 11 – Technical Notes & FAQ
### 11.1 Does the Script Repaint?
- Order Blocks and Springs are based on completed pivot structures and confirmed candles.
- Until a pivot is confirmed, an OB does not exist; after confirmation, behavior is stable under classic SMC assumptions.
- The script is designed to be structurally consistent rather than repainting signals arbitrarily.
### 11.2 Computational Load of Volume Profile
- On the last bar, the script processes up to `vp_lookback` bars × `vp_rows` rows.
- On very low timeframes with heavy zooming, this can become demanding.
- If you experience performance issues:
- Reduce `vp_lookback` or `vp_rows`, or
- Temporarily disable Volume Profile (`show_vp = false`).
### 11.3 Multi-Timeframe Behavior
- This version of the script is not internally multi-timeframe.
All logic (OB, DCA, Spring, Volume Profile) is computed on the active timeframe only.
- Practical workflow:
## Conclusion
Mars Signals – Ultimate Institutional Suite v3.0 (Joker) is a multi-layer trading framework that unifies:
into a single, coherent system driven by a transparent Confluence Scoring Engine.
The final output is presented in clear, actionable language:
The system is designed to support professional decision-making, not to replace it.
Used together with strict risk management and disciplined execution,
Mars Signals – UIS v3.0 (Joker) can serve as a central reference manual and operational guide
for your trading workflow, from scalping to swing and investment positioning.
Mars Signals – Ultimate Institutional Suite v3.0 (Joker)
## Chapter 1 – Philosophy & System Architecture
This script is not a simple “buy/sell” indicator.
Mars Signals – UIS v3.0 (Joker) is designed as an institutional-style analytical assistant that layers several methodologies into a single, coherent framework.
The system is built on four core pillars:
1. Smart Money Concepts (SMC)
- - Detection of Order Blocks (professional demand/supply zones).
- - Detection of Fair Value Gaps (FVGs) (price imbalances).
2. Smart DCA Strategy
- - Combination of RSI and Bollinger Bands
- - Identifies statistically discounted zones for scaling into spot positions or exiting shorts.
3. Volume Profile (Visible Range Simulation)
- - Distribution of volume by price, not by time.
- - Identification of POC (Point of Control) and high-/low-volume areas.
4. Wyckoff Helper – Spring
- - Detection of bear traps, liquidity grabs, and sharp bullish reversals.
All four pillars feed into a Confluence Engine (Scoring System).
The final output is presented in the Dashboard, with a clear, human-readable signal:
- - STRONG LONG 🚀
- - WEAK LONG ↗
- - NEUTRAL / WAIT
- - WEAK SHORT ↘
- - STRONG SHORT 🩸
This allows the trader to see *how many* and *which* layers of the system support a bullish or bearish bias at any given time.
## Chapter 2 – Settings Overview
### 2.1 General & Dashboard Group
- Show Dashboard Panel (`show_dash`)
Turns the dashboard table in the corner of the chart ON/OFF.
- Show Signal Recommendation (`show_rec`)
- - If enabled, the textual signal (STRONG LONG, WEAK SHORT, etc.) is displayed.
- - If disabled, you only see feature status (ON/OFF) and the current price.
- Dashboard Position (`dash_pos`)
Determines where the dashboard appears on the chart:
- - `Top Right`
- - `Bottom Right`
- - `Top Left`
### 2.2 Smart Money (SMC) Group
- Enable SMC Strategy (`show_smc`)
Globally enables or disables the Order Block and FVG logic.
- Order Block Pivot Lookback (`ob_period`)
Main parameter for detecting key pivot highs/lows (swing points).
- Default value: 5
- Concept:
A bar is considered a pivot low if its low is lower than the lows of the previous 5 and the next 5 bars.
Similarly, a pivot high has a high higher than the previous 5 and the next 5 bars.
These pivots are used as anchors for Order Blocks.
- Increasing `ob_period`:
- Fewer levels.
- But levels tend to be more significant and reliable.
- In highly volatile markets (major news, war events, FOMC, etc.),
using values 7–10 is recommended to filter out weak levels.
- Show Fair Value Gaps (`show_fvg`)
Enables/disables the drawing of FVG zones (imbalances).
- Bullish OB Color (`c_ob_bull`)
- Color of Bullish Order Blocks (Demand Zones).
- Default: semi-transparent green (transparency ≈ 80).
- Bearish OB Color (`c_ob_bear`)
- Color of Bearish Order Blocks (Supply Zones).
- Default: semi-transparent red.
- Bullish FVG Color (`c_fvg_bull`)
- Color of Bullish FVG (upward imbalance), typically yellow.
- Bearish FVG Color (`c_fvg_bear`)
- Color of Bearish FVG (downward imbalance), typically purple.
### 2.3 Smart DCA Strategy Group
- Enable DCA Zones (`show_dca`)
Enables the Smart DCA logic and visual labels.
- RSI Length (`rsi_len`)
Lookback period for RSI (default: 14).
- Shorter → more sensitive, more noise.
- Longer → fewer signals, higher reliability.
- Bollinger Bands Length (`bb_len`)
Moving average period for Bollinger Bands (default: 20).
- BB Multiplier (`bb_mult`)
Standard deviation multiplier for Bollinger Bands (default: 2.0).
- For extremely volatile markets, values like 2.5–3.0 can be used so that only extreme deviations trigger a DCA signal.
### 2.4 Volume Profile (Visible Range Sim) Group
- Show Volume Profile (`show_vp`)
Enables the simulated Volume Profile bars on the right side of the chart.
- Volume Lookback Bars (`vp_lookback`)
Number of bars used to compute the Volume Profile (default: 150).
- Higher values → broader historical context, heavier computation.
- Row Count (`vp_rows`)
Number of vertical price segments (rows) to divide the total price range into (default: 30).
- Width (%) (`vp_width`)
Relative width of each volume bar as a percentage.
In the code, bar widths are scaled relative to the row with the maximum volume.
> Technical note: Volume Profile calculations are executed only on the last bar (`barstate.islast`) to keep the script performant even on higher timeframes.
### 2.5 Wyckoff Helper Group
- Show Wyckoff Events (`show_wyc`)
Enables detection and plotting of Wyckoff Spring events.
- Volume MA Length (`vol_ma_len`)
Length of the moving average on volume.
A bar is considered to have Ultra Volume if its volume is more than 2× the volume MA.
## Chapter 3 – Smart Money Strategy (Order Blocks & FVG)
### 3.1 What Is an Order Block?
An Order Block (OB) represents the footprint of large institutional orders:
- Bullish Order Block (Demand Zone)
The last selling region (bearish candle/cluster) before a strong upward move.
- Bearish Order Block (Supply Zone)
The last buying region (bullish candle/cluster) before a strong downward move.
Institutions and large players place heavy orders in these regions. Typical price behavior:
- Price moves away from the zone.
- Later returns to the same zone to fill unfilled orders.
- Then continues the larger trend.
In the script:
- If `pl` (pivot low) forms → a Bullish OB is created.
- If `ph` (pivot high) forms → a Bearish OB is created.
The box is drawn:
- From `bar_index[ob_period]` to `bar_index`.
- Between `low[ob_period]` and `high[ob_period]`.
- `extend=extend.right` extends the OB into the future, so it acts as a dynamic support/resistance zone.
- Only the last 4 OB boxes are kept to avoid clutter.
### 3.2 Order Block Color Guide
- Semi-transparent Green (`c_ob_bull`)
- Represents a Bullish Order Block (Demand Zone).
- Interpretation: a price region with a high probability of bullish reaction.
- Semi-transparent Red (`c_ob_bear`)
- Represents a Bearish Order Block (Supply Zone).
- Interpretation: a price region with a high probability of bearish reaction.
Overlap (Multiple OBs in the Same Area)
When two or more Order Blocks overlap:
- The shared area appears visually denser/stronger.
- This suggests higher order density.
- Such zones can be treated as high-priority levels for entries, exits, and stop-loss placement.
### 3.3 Demand/Supply Logic in the Scoring Engine
is_in_demand = low <= ta.lowest(low, 20)[1]
is_in_supply = high >= ta.highest(high, 20)[1]
- If current price is near the lowest lows of the last 20 bars, it is considered in a Demand Zone → positive impact on score.
- If current price is near the highest highs of the last 20 bars, it is considered in a Supply Zone → negative impact on score.
This logic complements Order Blocks and helps the Dashboard distinguish whether:
- Market is currently in a statistically cheap (long-friendly) area, or
- In a statistically expensive (short-friendly) area.
### 3.4 Fair Value Gaps (FVG)
#### Concept
When the market moves aggressively:
- Some price levels are skipped and never traded.
- A gap between wicks/shadows of consecutive candles appears.
- These regions are called Fair Value Gaps (FVGs) or Imbalances.
The market generally “dislikes” imbalance and often:
- Returns to these zones in the future.
- Fills the gap (rebalance).
- Then resumes its dominant direction.
#### Implementation in the Code
Bullish FVG (Yellow)
fvg_bull_cond = show_smc and show_fvg and low > high[2] and close[1] > high[2]
if fvg_bull_cond
box.new(bar_index[2], high[2], bar_index, low, ...)
Core condition:
`low > high[2]` → the current low is above the high of two bars ago; the space between them is an untraded gap.
Bearish FVG (Purple)
fvg_bear_cond = show_smc and show_fvg and high < low[2] and close[1] < low[2]
if fvg_bear_cond
box.new(bar_index[2], low[2], bar_index, high, ...)
Core condition:
`high < low[2]` → the current high is below the low of two bars ago; again a price gap exists.
#### FVG Color Guide
- Transparent Yellow (`c_fvg_bull`) – Bullish FVG
Often acts like a magnet for price:
- Price tends to retrace into this zone,
- Fill the imbalance,
- And then continue higher.
- Transparent Purple (`c_fvg_bear`) – Bearish FVG
Price tends to:
- Retrace upward into the purple area,
- Fill the imbalance,
- And then resume downward movement.
#### Trading with FVGs
- FVGs are *not* standalone entry signals.
They are best used as:
- Targets (take-profit zones), or
- Reaction areas where you expect a pause or reversal.
Examples:
- If you are long, a bearish FVG above is often an excellent take-profit zone.
- If you are short, a bullish FVG below is often a good cover/exit zone.
### 3.5 Core SMC Trading Templates
#### Reversal Long
1. Price trades down into a green Order Block (Demand Zone).
2. A bullish confirmation candle (Close > Open) forms inside or just above the OB.
3. If this zone is close to or aligned with a bullish FVG (yellow), the signal is reinforced.
4. Entry:
- At the close of the confirmation candle, or
- Using a limit order near the upper boundary of the OB.
5. Stop-loss:
- Slightly below the OB.
- If the OB is broken decisively and price consolidates below it, the zone loses validity.
6. Targets:
- The next FVG,
- Or the next red Order Block (Supply Zone) above.
#### Reversal Short
The mirror scenario:
- Price rallies into a red Order Block (Supply).
- A bearish confirmation candle forms (Close < Open).
- FVG/premium structure above can act as a confluence.
- Stop-loss goes above the OB.
- Targets: lower FVGs or subsequent green OBs below.
## Chapter 4 – Smart DCA Strategy (RSI + Bollinger Bands)
### 4.1 Smart DCA Concept
- Classic DCA = buying at fixed time intervals regardless of price.
- Smart DCA = scaling in only when:
- Price is statistically cheaper than usual, and
- The market is in a clear oversold condition.
Code logic:
rsi_val = ta.rsi(close, rsi_len)
[bb_mid, bb_upper, bb_lower] = ta.bb(close, bb_len, bb_mult)
dca_buy = show_dca and rsi_val < 30 and close < bb_lower
dca_sell = show_dca and rsi_val > 70 and close > bb_upper
Conditions:
- DCA Buy – Smart Scale-In Zone
- RSI < 30 → oversold.
- Close < lower Bollinger Band → price has broken below its typical volatility envelope.
- DCA Sell – Overbought/Distribution Zone
- RSI > 70 → overbought.
- Close > upper Bollinger Band → price is extended far above the mean.
### 4.2 Visual Representation on the Chart
- Green “DCA” Label Below Candle
- Shape: `labelup`.
- Color: lime background, white text.
- Meaning: statistically attractive level for laddered spot entries or short exits.
- Red “SELL” Label Above Candle
- Warning that the market is in an extended, overbought condition.
- Suitable for profit-taking on longs or considering short entries (with proper confluence and risk management).
- Light Green Background (`bgcolor`)
- When `dca_buy` is true, the candle background turns very light green (high transparency).
- This helps visually identify DCA Zones across the chart at a glance.
### 4.3 Practical Use in Trading
#### Spot Trading
Used to build a better average entry price:
- Every time a DCA label appears, allocate a fixed portion of capital (e.g., 2–5%).
- Combining DCA signals with:
- Green OBs (Demand Zones), and/or
- The Volume Profile POC
makes the zone structurally more important.
#### Futures Trading
- Longs
- Use DCA Buy signals as low-risk zones for opening or adding to longs when:
- Price is inside a green OB, or
- The Dashboard already leans LONG.
- Shorts
- Use DCA Sell signals as:
- Exit zones for longs, or
- Areas to initiate shorts with stops above structural highs.
## Chapter 5 – Volume Profile (Visible Range Simulation)
### 5.1 Concept
Traditional volume (histogram under the chart) shows volume over time.
Volume Profile shows volume by price level:
- At which prices has the highest trading activity occurred?
- Where did buyers and sellers agree the most (High Volume Nodes – HVNs)?
- Where did price move quickly due to low participation (Low Volume Nodes – LVNs)?
### 5.2 Implementation in the Script
Executed only when `show_vp` is enabled and on the last bar:
1. The last `vp_lookback` bars (default 150) are processed.
2. The minimum low and maximum high over this window define the price range.
3. This price range is divided into `vp_rows` segments (e.g., 30 rows).
4. For each row:
- All bars are scanned.
- If the mid-price `(high[j] + low[j]) / 2` falls inside a row, that bar’s volume is added to the row total.
5. The row with the greatest volume is stored as `max_vol_idx` (the POC row).
6. For each row, a volume box is drawn on the right side of the chart.
### 5.3 Color Scheme
- Semi-transparent Orange
- The row with the maximum volume – the Point of Control (POC).
- Represents the strongest support/resistance level from a volume perspective.
- Semi-transparent Blue
- Other volume rows.
- The taller the bar → the higher the volume → the stronger the interest at that price band.
### 5.4 Trading Applications
- If price is above POC and retraces back into it:
→ POC often acts as support, suitable for long setups.
- If price is below POC and rallies into it:
→ POC often acts as resistance, suitable for short setups or profit-taking.
HVNs (Tall Blue Bars)
- Represent areas of equilibrium where the market has spent time and traded heavily.
- Price tends to consolidate here before choosing a direction.
LVNs (Short or Nearly Empty Bars)
- Represent low participation zones.
- Price often moves quickly through these areas – useful for targeting fast moves.
## Chapter 6 – Wyckoff Helper – Spring
### 6.1 Spring Concept
In the Wyckoff framework:
- A Spring is a false break of support.
- The market briefly trades below a well-defined support level, triggers stop losses,
then sharply reverses upward as institutional buyers absorb liquidity.
This movement:
- - Clears out weak hands (retail sellers).
- - Provides large players with liquidity to enter long positions.
- - Often initiates a new uptrend.
### 6.2 Code Logic
Conditions for a Spring:
1. The current low is lower than the lowest low of the previous 50 bars
→ apparent break of a long-standing support.
2. The bar closes bullish (Close > Open)
→ the breakdown was rejected.
3. Volume is significantly elevated:
→ `volume > 2 × volume_MA` (Ultra Volume).
When all conditions are met and `show_wyc` is enabled:
- A pink diamond is plotted below the bar,
- With the label “Spring” – one of the strongest long signals in this system.
### 6.3 Trading Use
- After a valid Spring, markets frequently enter a meaningful bullish phase.
- The highest quality setups occur when:
- The Spring forms inside a green Order Block, and
- Near or on the Volume Profile POC.
Entries:
- At the close of the Spring bar, or
- On the first pullback into the mid-range of the Spring candle.
Stop-loss:
- Slightly below the Spring’s lowest point (wick low plus a small buffer).
## Chapter 7 – Confluence Engine & Dashboard
### 7.1 Scoring Logic
For each bar, the script:
1. Resets `score` to 0.
2. Adjusts the score based on different signals.
SMC Contribution
if show_smc
if is_in_demand
score += 1
if is_in_supply
score -= 1
- Being in Demand → `+1`
- Being in Supply → `-1`
DCA Contribution
if show_dca
if dca_buy
score += 2
if dca_sell
score -= 2
- DCA Buy → `+2` (strong, statistically driven long signal)
- DCA Sell → `-2`
Wyckoff Spring Contribution
if show_wyc
if wyc_spring
score += 2
- Spring → `+2` (entry of strong money)
### 7.2 Mapping Score to Dashboard Signal
- - score ≥ 2 → STRONG LONG 🚀
- Multiple bullish conditions aligned.
- - score = 1 → WEAK LONG ↗
- Some bullish bias, but only one layer clearly positive.
- - score = 0 → NEUTRAL / WAIT
- Rough balance between buying and selling forces; staying flat is usually preferable.
- - score = -1 → WEAK SHORT ↘
- Mild bearish bias, suited for cautious or short-term plays.
- - score ≤ -2 → STRONG SHORT 🩸
- Convergence of several bearish signals.
### 7.3 Dashboard Structure
The dashboard is a two-column table:
- Row 0
- - Column 0: `"Mars Signals"` – black background, white text.
- - Column 1: `"UIS v3.0"` – black background, yellow text.
- Row 1
- - Column 0: `"Price:"` (light grey background).
- - Column 1: current closing price (`close`) with a semi-transparent blue background.
- Row 2
- Column 0: `"SMC:"`
- Column 1:
- - `"ON"` (green) if `show_smc = true`
- - `"OFF"` (grey) otherwise.
- Row 3
- Column 0: `"DCA:"`
- Column 1:
- - `"ON"` (green) if `show_dca = true`
- - `"OFF"` (grey) otherwise.
- Row 4
- - Column 0: `"Signal:"`
- - Column 1: signal text (`status_txt`) with background color `status_col`
- (green, red, teal, maroon, etc.)
- - If `show_rec = false`, these cells are cleared.
## Chapter 8 – Visual Legend (Colors, Shapes & Actions)
For quick reading inside TradingView, the visual elements are described line by line instead of a table.
Chart Element: Green Box
Color / Shape: Transparent green rectangle
Core Meaning: Bullish Order Block (Demand Zone)
Suggested Trader Response: Look for longs, Smart DCA adds, closing or reducing shorts.
Chart Element: Red Box
Color / Shape: Transparent red rectangle
Core Meaning: Bearish Order Block (Supply Zone)
Suggested Trader Response: Look for shorts, or take profit on existing longs.
Chart Element: Yellow Area
Color / Shape: Transparent yellow zone
Core Meaning: Bullish FVG / upside imbalance
Suggested Trader Response: Short take-profit zone or expected rebalance area.
Chart Element: Purple Area
Color / Shape: Transparent purple zone
Core Meaning: Bearish FVG / downside imbalance
Suggested Trader Response: Long take-profit zone or temporary supply region.
Chart Element: Green "DCA" Label
Color / Shape: Green label with white text, plotted below the candle
Core Meaning: Smart ladder-in buy zone, DCA buy opportunity
Suggested Trader Response: Spot DCA entry, partial short exit.
Chart Element: Red "SELL" Label
Color / Shape: Red label with white text, plotted above the candle
Core Meaning: Overbought / distribution zone
Suggested Trader Response: Take profit on longs, consider initiating shorts.
Chart Element: Light Green Background (bgcolor)
Color / Shape: Very transparent light-green background behind bars
Core Meaning: Active DCA Buy zone
Suggested Trader Response: Treat as a discount zone on the chart.
Chart Element: Orange Bar on Right
Color / Shape: Transparent orange horizontal bar in the volume profile
Core Meaning: POC – price with highest traded volume
Suggested Trader Response: Strong support or resistance; key reference level.
Chart Element: Blue Bars on Right
Color / Shape: Transparent blue horizontal bars in the volume profile
Core Meaning: Other volume levels, showing high-volume and low-volume nodes
Suggested Trader Response: Use to identify balance zones (HVN) and fast-move corridors (LVN).
Chart Element: Pink "Spring" Diamond
Color / Shape: Pink diamond with white text below the candle
Core Meaning: Wyckoff Spring – liquidity grab and potential major bullish reversal
Suggested Trader Response: One of the strongest long signals in the suite; look for high-quality long setups with tight risk.
Chart Element: STRONG LONG in Dashboard
Color / Shape: Green background, white text in the Signal row
Core Meaning: Multiple bullish layers in confluence
Suggested Trader Response: Consider initiating or increasing longs with strict risk management.
Chart Element: STRONG SHORT in Dashboard
Color / Shape: Red background, white text in the Signal row
Core Meaning: Multiple bearish layers in confluence
Suggested Trader Response: Consider initiating or increasing shorts with a logical, well-placed stop.
## Chapter 9 – Timeframe-Based Trading Playbook
### 9.1 Timeframe Selection
- Scalping
- - Timeframes: 1M, 5M, 15M
- - Objective: fast intraday moves (minutes to a few hours).
- - Recommendation: focus on SMC + Wyckoff.
- Smart DCA on very low timeframes may introduce excessive noise.
- Day Trading
- - Timeframes: 15M, 1H, 4H
- - Provides a good balance between signal quality and frequency.
- - Recommendation: use the full stack – SMC + DCA + Volume Profile + Wyckoff + Dashboard.
- Swing Trading & Position Investing
- - Timeframes: Daily, Weekly
- - Emphasis on Smart DCA + Volume Profile.
- - SMC and Wyckoff are used mainly to fine-tune swing entries within larger trends.
### 9.2 Scenario A – Scalping Long
Example: 5-Minute Chart
1. Price is declining into a green OB (Bullish Demand).
2. A candle with a long lower wick and bullish close (Pin Bar / Rejection) forms inside the OB.
3. A Spring diamond appears below the same candle → very strong confluence.
4. The Dashboard shows at least WEAK LONG ↗, ideally STRONG LONG 🚀.
5. Entry:
- - On the close of the confirmation candle, or
- - On the first pullback into the mid-range of that candle.
6. Stop-loss:
- - Slightly below the OB.
7. Targets:
- - Nearby bearish FVG above, and/or
- - The next red OB.
### 9.3 Scenario B – Day-Trading Short
Recommended Timeframes: 1H or 4H
1. The market completes a strong impulsive move upward.
2. Price enters a red Order Block (Supply).
3. In the same zone, a purple FVG appears or remains unfilled.
4. On a lower timeframe (e.g., 15M), RSI enters overbought territory and a DCA Sell signal appears.
5. The main timeframe Dashboard (1H) shows WEAK SHORT ↘ or STRONG SHORT 🩸.
Trade Plan
- Open a short near the upper boundary of the red OB.
- Place the stop above the OB or above the last swing high.
- Targets:
- - A yellow FVG lower on the chart, and/or
- - The next green OB (Demand) below.
### 9.4 Scenario C – Swing / Investment with Smart DCA
Timeframes: Daily / Weekly
1. On the daily or weekly chart, each time a green “DCA” label appears:
- - Allocate a fixed fraction of your capital (e.g., 3–5%) to that asset.
2. Check whether this DCA zone aligns with the orange POC of the Volume Profile:
- - If yes → the quality of the entry zone is significantly higher.
3. If the DCA signal sits inside a daily green OB, the probability of a medium-term bottom increases.
4. Always build the position laddered, never all-in at a single price.
Exits for investors:
- - Near weekly red OBs or large purple FVG zones.
- - Ideally via partial profit-taking rather than closing 100% at once.
### 9.5 Case Study 1 – BTCUSDT (15-Minute)
- - Context: Price has sold off down towards 65,000 USD.
- - A green OB had previously formed at that level.
- - Near the lower boundary of this OB, a partially filled yellow FVG is present.
- - As price returns to this region, a Spring appears.
- - The Dashboard shifts from NEUTRAL / WAIT to WEAK LONG ↗.
Plan
- - Enter a long near the OB low.
- - Place stop below the Spring low.
- - First target: a purple FVG around 66,200.
- - Second (optional) target: the first red OB above that level.
### 9.6 Case Study 2 – Meme Coin (PEPE – 4H)
- - After a strong pump, price enters a corrective phase.
- - On the 4H chart, RSI drops below 30; price breaks below the lower Bollinger Band → a DCA label prints.
- - The Volume Profile shows the POC at approximately the same level.
- - The Dashboard displays STRONG LONG 🚀.
Plan
- - Execute laddered buys in the combined DCA + POC zone.
- - Place a protective stop below the last significant swing low.
- - Target: an expected 20–30% upside move towards the next red OB or purple FVG.
## Chapter 10 – Risk Management, Psychology & Advanced Tuning
### 10.1 Risk Management
No signal, regardless of its strength, replaces risk control.
Recommendations:
- In futures, do not expose more than 1–3% of account equity to risk per trade.
- Adjust leverage to the volatility of the instrument (lower leverage for highly volatile altcoins).
- Place stop-losses in zones where the idea is clearly invalidated:
- Below/above the relevant Order Block or Spring, not randomly in the middle of the structure.
### 10.2 Market-Specific Parameter Tuning
- Calmer Markets (e.g., major FX pairs)
- - `ob_period`: 3–5.
- - `bb_mult`: 2.0 is usually sufficient.
- Highly Volatile Markets (Crypto, news-driven assets)
- - `ob_period`: 7–10 to highlight only the most robust OBs.
- - `bb_mult`: 2.5–3.0 so that only extreme deviations trigger DCA.
- - `vol_ma_len`: increase (e.g., to ~30) so that Spring triggers only on truly exceptional
### 10.3 Trading Psychology
- STRONG LONG 🚀 does not mean “risk-free”.
It means the probability of a successful long, given the model’s logic, is higher than average.
- Treat Mars Signals as a confirmation and context system, not a full replacement for your own decision-making.
- Example of disciplined thinking:
- - The Dashboard prints STRONG LONG,
- - But price is simultaneously testing a multi-month macro resistance or a major negative news event is imminent,
- - In such cases, trade smaller, widen stops appropriately, or skip the trade.
## Chapter 11 – Technical Notes & FAQ
### 11.1 Does the Script Repaint?
- Order Blocks and Springs are based on completed pivot structures and confirmed candles.
- Until a pivot is confirmed, an OB does not exist; after confirmation, behavior is stable under classic SMC assumptions.
- The script is designed to be structurally consistent rather than repainting signals arbitrarily.
### 11.2 Computational Load of Volume Profile
- On the last bar, the script processes up to `vp_lookback` bars × `vp_rows` rows.
- On very low timeframes with heavy zooming, this can become demanding.
- If you experience performance issues:
- Reduce `vp_lookback` or `vp_rows`, or
- Temporarily disable Volume Profile (`show_vp = false`).
### 11.3 Multi-Timeframe Behavior
- This version of the script is not internally multi-timeframe.
All logic (OB, DCA, Spring, Volume Profile) is computed on the active timeframe only.
- Practical workflow:
- - Analyze overall structure and key zones on higher timeframes (4H / Daily).
- - Use lower timeframes (15M / 1H) with the same tool for timing entries and exits.
## Conclusion
Mars Signals – Ultimate Institutional Suite v3.0 (Joker) is a multi-layer trading framework that unifies:
- - Price structure (Order Blocks & FVG),
- - Statistical behavior (Smart DCA via RSI + Bollinger),
- - Volume distribution by price (Volume Profile with POC, HVN, LVN),
- - Liquidity events (Wyckoff Spring),
into a single, coherent system driven by a transparent Confluence Scoring Engine.
The final output is presented in clear, actionable language:
> STRONG LONG / WEAK LONG / NEUTRAL / WEAK SHORT / STRONG SHORT
The system is designed to support professional decision-making, not to replace it.
Used together with strict risk management and disciplined execution,
Mars Signals – UIS v3.0 (Joker) can serve as a central reference manual and operational guide
for your trading workflow, from scalping to swing and investment positioning.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。