PROTECTED SOURCE SCRIPT
@M5V | Standard Deviation (Basic) | GCT

Standard Deviation (Basic) — Patch Notes
What’s new
• Two custom sessions (A & B) only—no presets.
• Timezone-aware sessions (IANA, e.g., America/New_York, Europe/London).
• Exact width matching: SD lines span exactly from the session’s first bar to its last bar
(same as the box).
• Start/End verticals control: None, Start only, End only, or Both.
• Anchor choice: Build ranges from either Wicks or Bodies.
• Deviation style: Full (1.0× steps) or Half (0.5× steps), with adjustable count.
• Optional Equilibrium (midline).
• Global line style and box visibility toggles.
How it works (under the hood)
1. Session tracking:
• At each session start (based on your Session + Timezone) the script stores the start bar and initializes hi/lo.
• While the session is active, it updates hi/lo using Wicks or Bodies (your choice) and extends the box to the current bar.
• On session end, it records the end bar.
2. Deviation drawing:
• Computes range = high − low.
• Draws symmetric SD bands above/below using your Full/Half setting and count.
• All SD lines are drawn from start bar → end bar so they match the box width exactly.
• If Equilibrium is on, the midline (avg of high/low) is drawn across the same width.
3. Start/End lines:
• According to Start/End Lines setting, verticals are drawn at the start bar, end bar, both, or not at all—each spanning from session low to high.
Quick use
• Pick Session windows for A/B and set each Timezone.
• Choose Wicks or Bodies, Full/Half deviations, Count, Color, and whether to show
Equilibrium and Boxes.
• Set Start/End Lines to control the vertical markers.
• Optional: change Line Style (solid/dotted/dashed).
What’s new
• Two custom sessions (A & B) only—no presets.
• Timezone-aware sessions (IANA, e.g., America/New_York, Europe/London).
• Exact width matching: SD lines span exactly from the session’s first bar to its last bar
(same as the box).
• Start/End verticals control: None, Start only, End only, or Both.
• Anchor choice: Build ranges from either Wicks or Bodies.
• Deviation style: Full (1.0× steps) or Half (0.5× steps), with adjustable count.
• Optional Equilibrium (midline).
• Global line style and box visibility toggles.
How it works (under the hood)
1. Session tracking:
• At each session start (based on your Session + Timezone) the script stores the start bar and initializes hi/lo.
• While the session is active, it updates hi/lo using Wicks or Bodies (your choice) and extends the box to the current bar.
• On session end, it records the end bar.
2. Deviation drawing:
• Computes range = high − low.
• Draws symmetric SD bands above/below using your Full/Half setting and count.
• All SD lines are drawn from start bar → end bar so they match the box width exactly.
• If Equilibrium is on, the midline (avg of high/low) is drawn across the same width.
3. Start/End lines:
• According to Start/End Lines setting, verticals are drawn at the start bar, end bar, both, or not at all—each spanning from session low to high.
Quick use
• Pick Session windows for A/B and set each Timezone.
• Choose Wicks or Bodies, Full/Half deviations, Count, Color, and whether to show
Equilibrium and Boxes.
• Set Start/End Lines to control the vertical markers.
• Optional: change Line Style (solid/dotted/dashed).
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.