Perfect Box Santai
- インディケータ
- SAPARUDIN -
- バージョン: 6.0
- アクティベーション: 20
Concept
HighLow Range Box tracks price movement sequentially to detect a defined pip range. Each time price moves the specified range from a previous Swing High or Swing Low, a box is automatically drawn on the chart.
Box Formation Logic
RED Box (High → Low / Bearish): Forms when price drops ≥ Range pip from a Swing High.
BLUE Box (Low → High / Bullish): Forms when price rises ≥ Range pip from a Swing Low.
Detection method (selectable via input):
- Close candle — box forms only when the closing price reaches the range threshold
- High/Low candle — box forms as soon as the candle's high or low touches the threshold (more sensitive)
Entry Signals
The indicator generates two independent signal types per box:
Formation Signal
Fires on the exact candle that completes the range:
- RED box completed → ▼ SELL label appears above the candle
- BLUE box completed → ▲ BUY label appears below the candle
Breakout Signal
Fires when price breaks through the box boundary after formation:
- Close breaks below the bottom of a RED box → ▼ SELL
- Close breaks above the top of a BLUE box → ▲ BUY
Additional Features
Vertical Transition Lines
A vertical dashed line is drawn at the start of each new box, clearly marking the transition between bearish and bullish phases across the chart.
Account Info Panel (top-right)
Displays real-time account statistics, updated every second:
- Account name, login number, server, and currency
- Balance, Equity, and floating P/L
- Today's profit & withdrawal (% of today's opening balance + deposits)
- This week's profit & withdrawal (% of Monday's opening balance + weekly deposits)
- This month's profit & withdrawal (% of 1st-of-month balance + monthly deposits)
All percentage calculations use the actual starting capital for each period (reconstructed from deal history), ensuring accurate performance tracking even when deposits or withdrawals occur mid-period.
BEP + TP/SL Lines
Calculates the Break Even Point (BEP) from the volume-weighted average open price of all active positions on the current symbol, then draws:
- BEP line for BUY positions and BEP line for SELL positions
Hedge/Lock detection logic:
| Scenario | Behavior |
|---|---|
| BUY lot = SELL lot | BEP lines only — TP/SL hidden (locked position) |
| All positions closed | All BEP/TP/SL lines automatically removed |
Candle Countdown Timer
Displays the remaining time of the current candle next to the live price. The color changes as the candle nears its close:
- White — more than 30 seconds remaining
- Orange — 30 seconds or less
- Red — 10 seconds or less
Input Parameters
| Group | Parameter | Default | Description |
|---|---|---|---|
| Range & Bar | Range (Pip) | 50 | Box range width in pips |
| Range & Bar | Bars Scanned | 500 | How many bars back to scan |
| Range & Bar | Use Close Candle | true | true = close price detection, false = high/low |
| RED Box | Border Color | Crimson | Box border color |
| RED Box | Midline Color | OrangeRed | 50% midline color |
| RED Box | Midline Width/Style | 2 / Dash | Midline appearance |
| BLUE Box | Border Color | DodgerBlue | Box border color |
| BLUE Box | Midline Color | Orange | 50% midline color |
| BLUE Box | Midline Width/Style | 2 / Dash | Midline appearance |
| Labels | Show Labels | false | Show price labels on box edges |
| Signals | Show Signals | true | Enable BUY/SELL labels |
| Signals | BUY/SELL Color | Lime/Red | Signal label colors |
| Signals | Font Size | 10 | Signal label font size |
| Signals | Color Candle | true | Highlight signal candles |
| Signals | Candle BUY/SELL Color | Lime/Red | Signal candle colors |
| Panel Layout | Show Panel | true | Enable account info panel |
| Panel Layout | X Distance | 300 | Panel horizontal position (px from right) |
| Panel Layout | Y Distance | 1 | Panel vertical position (px from top) |
| Panel Layout | Row Spacing | 16 | Vertical spacing between rows (px) |
| Panel Layout | Font Size | 8 | Panel font size |
| Panel Layout | Colors | Various | Header, value, label, positive, negative colors |
| BEP + TP/SL | Show BEP | true | Enable BEP and TP/SL lines |
| BEP + TP/SL | TP Step (pip) | 50 | Distance between TP levels |
| BEP + TP/SL | SL Step (pip) | 50 | Distance between SL levels |
| BEP + TP/SL | TP/SL Count | 6 | Number of TP/SL levels (max 6) |
| BEP + TP/SL | Line Colors | Various | BEP, TP, SL line colors |
| Vertical Lines | Show V-Lines | true | Enable transition vertical lines |
| Vertical Lines | Color/Width/Style | Silver/1/Dot | Line appearance |
Recommended Settings
| Timeframe | Range (pip) | Detection Mode |
|---|---|---|
| M1 / M2 | 10–30 | High/Low |
| M5 / M10 | 30–50 | Close or High/Low |
| M15 / M30 | 50–100 | Close |
| H1 / H4 | 100–300 | Close |
| D1 | 300–500 | Close |
How to Use
- Attach the indicator to your desired symbol and timeframe
- Set Range (Pip) according to the instrument's volatility
- Use Formation signals for aggressive entries — trade in the direction of the box as it forms
- Use Breakout signals as confirmation — wait for price to close through the box boundary
- Use the Account Info Panel to track daily, weekly, and monthly performance in real time
Notes
- All historical boxes remain visible on the chart for back-reference
- Signals are non-repainting — each signal fires once per box and does not change
- The indicator uses EventSetTimer(1) for real-time panel and candle timer updates
- Compatible with all symbols: Forex, Gold (XAUUSD), Indices, Crypto
- Optimized for performance: box detection runs only on new bar close, not every tick

