OPEN-SOURCE SCRIPT
Quantrader

📊 Overview
This custom indicator combines intraday session analysis with multi-timeframe trend confirmation to identify high-probability trading opportunities. It features:
Custom intraday session tracking (GMT+7 timezone)
Multi-level moving average confluence (SMA 20, 100, 200)
Bollinger Bands mean reversion signals
Key intraday reference levels
⚙️ Core Components
1. Custom Intraday Session Tracking
Session Start: 7:00 AM GMT+7 (Vietnamese market open)
Calculates per session:
Intraday High/Low (resets at 7:00 AM daily)
Intraday Midline = (Session High + Session Low) / 2
Pre-Day Center = Previous day's midline (carried forward)
Open Day = First 15-minute candle's open price
2. Trend Analysis Framework
SMA 20 (Short-term momentum)
SMA 100 (Medium-term trend)
SMA 200 (Long-term trend direction)
Bollinger Bands (20-period, 2 standard deviations)
3. Signal Detection Logic
Bullish Mean Reversion Setup:
javascript
Condition 1: Green candle closes ABOVE Upper Bollinger Band
Condition 2: Following candle is ALSO green
→ Triggers: Green highlight + Triangle below bar
Bearish Mean Reversion Setup:
javascript
Condition 1: Red candle closes BELOW Lower Bollinger Band
Condition 2: Following candle is ALSO red
→ Triggers: Red highlight + Triangle above bar
🎯 Visual Elements
Element Color Description
Intraday Midline Blue Real-time session midpoint
Pre-Day Center Yellow Yesterday's midline (reference)
Open Day Purple (dashed) Day's opening price
SMA 20 Red Short-term trend
SMA 100 Green Medium-term trend
SMA 200 Orange Long-term trend
Bollinger Bands Red/Green/Blue Volatility boundaries
Bull Signal Green triangle ↓ Oversold bounce potential
Bear Signal Red triangle ↑ Overbought rejection potential
📈 Trading Applications
1. Trend Confirmation
Bullish Alignment: Price > All SMAs + Above Intraday Midline
Bearish Alignment: Price < All SMAs + Below Intraday Midline
2. Mean Reversion Opportunities
Overbought Scenario: Consecutive green candles above Upper BB → Potential reversal
Oversold Scenario: Consecutive red candles below Lower BB → Potential bounce
3. Intraday Level Trading
Intraday Midline: Dynamic support/resistance
Pre-Day Center: Psychological reference level
Open Day: Key opening price level
⚡ Key Features
Automatic Session Reset: Daily at 7:00 AM GMT+7
Multi-Timeframe Confluence: Combines intraday, daily, and trend analysis
Clean Visual Design: Non-cluttered, focused on key levels
Real-Time Calculation: All levels update with each new candle
🛠️ Recommended Settings
Timeframe: 15-minute to 1-hour charts
Markets: Forex, Indices, Commodities
Best Pairs: EURUSD, XAUUSD, VN30, USDJPY
Trading Style: Swing trading, Day trading
📖 Usage Tips
Trend Trading: Enter in direction of SMA alignment (20 > 100 > 200 for bullish)
Mean Reversion: Use BB signals at key intraday levels (Midline, Pre-Day Center)
Confirmation: Wait for candle close above/below key levels
Risk Management: Place stops beyond opposite intraday extreme
🎨 Customization Options
Users can modify:
Session start time (line 6)
Bollinger Band parameters (length, multiplier)
SMA periods
Color schemes
This custom indicator combines intraday session analysis with multi-timeframe trend confirmation to identify high-probability trading opportunities. It features:
Custom intraday session tracking (GMT+7 timezone)
Multi-level moving average confluence (SMA 20, 100, 200)
Bollinger Bands mean reversion signals
Key intraday reference levels
⚙️ Core Components
1. Custom Intraday Session Tracking
Session Start: 7:00 AM GMT+7 (Vietnamese market open)
Calculates per session:
Intraday High/Low (resets at 7:00 AM daily)
Intraday Midline = (Session High + Session Low) / 2
Pre-Day Center = Previous day's midline (carried forward)
Open Day = First 15-minute candle's open price
2. Trend Analysis Framework
SMA 20 (Short-term momentum)
SMA 100 (Medium-term trend)
SMA 200 (Long-term trend direction)
Bollinger Bands (20-period, 2 standard deviations)
3. Signal Detection Logic
Bullish Mean Reversion Setup:
javascript
Condition 1: Green candle closes ABOVE Upper Bollinger Band
Condition 2: Following candle is ALSO green
→ Triggers: Green highlight + Triangle below bar
Bearish Mean Reversion Setup:
javascript
Condition 1: Red candle closes BELOW Lower Bollinger Band
Condition 2: Following candle is ALSO red
→ Triggers: Red highlight + Triangle above bar
🎯 Visual Elements
Element Color Description
Intraday Midline Blue Real-time session midpoint
Pre-Day Center Yellow Yesterday's midline (reference)
Open Day Purple (dashed) Day's opening price
SMA 20 Red Short-term trend
SMA 100 Green Medium-term trend
SMA 200 Orange Long-term trend
Bollinger Bands Red/Green/Blue Volatility boundaries
Bull Signal Green triangle ↓ Oversold bounce potential
Bear Signal Red triangle ↑ Overbought rejection potential
📈 Trading Applications
1. Trend Confirmation
Bullish Alignment: Price > All SMAs + Above Intraday Midline
Bearish Alignment: Price < All SMAs + Below Intraday Midline
2. Mean Reversion Opportunities
Overbought Scenario: Consecutive green candles above Upper BB → Potential reversal
Oversold Scenario: Consecutive red candles below Lower BB → Potential bounce
3. Intraday Level Trading
Intraday Midline: Dynamic support/resistance
Pre-Day Center: Psychological reference level
Open Day: Key opening price level
⚡ Key Features
Automatic Session Reset: Daily at 7:00 AM GMT+7
Multi-Timeframe Confluence: Combines intraday, daily, and trend analysis
Clean Visual Design: Non-cluttered, focused on key levels
Real-Time Calculation: All levels update with each new candle
🛠️ Recommended Settings
Timeframe: 15-minute to 1-hour charts
Markets: Forex, Indices, Commodities
Best Pairs: EURUSD, XAUUSD, VN30, USDJPY
Trading Style: Swing trading, Day trading
📖 Usage Tips
Trend Trading: Enter in direction of SMA alignment (20 > 100 > 200 for bullish)
Mean Reversion: Use BB signals at key intraday levels (Midline, Pre-Day Center)
Confirmation: Wait for candle close above/below key levels
Risk Management: Place stops beyond opposite intraday extreme
🎨 Customization Options
Users can modify:
Session start time (line 6)
Bollinger Band parameters (length, multiplier)
SMA periods
Color schemes
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน