OPEN-SOURCE SCRIPT
Cập nhật Strategy with Reference Lines

📊 Strategy with Reference Lines
Description:
This strategy uses a contrarian approach based on the analysis of the previous candle to identify entry and exit points. The strategy draws horizontal reference lines at important levels of the previous candle and generates buy/sell signals based on the candle's direction.
Key Features:
🔹 Multi-Timeframe Analysis: Configurable for 1H, 2H, 3H, 4H, 6H, 12H, and 1D
🔹 Reference Lines: High, low, close, and midpoint (50%) of the previous candle
🔹 Visual Signals: Labels with prices and actions (BUY/SELL/TP)
🔹 Optional Trading: Enable/disable automatic order execution
🔹 Complete System: Automatic entry, Take Profit, and Stop Loss
🔹 Alerts: Notifications when a new candle is detected
Strategy Logic:
When the previous candle is POSITIVE:
Signal: 🔴 SELL at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🔴 High of the previous candle
When the previous candle is NEGATIVE:
Signal: 🟢 BUY at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🟢 Low of the previous candle
Visual Elements:
Green Line: High of the previous candle (when positive)
Red Line: Low of the previous candle (when negative)
Yellow Line: Close of the previous candle (always present)
Blue Line: Midpoint (50%) of the previous candle (always present)
Labels: Prices and actions with emojis for easy identification
Settings:
Timeframe: Default 4H (configurable)
Auto Trading: Disabled by default (safety)
Alerts: Include entry prices, TP, and SL
Recommended Usage:
✅ Visual Analysis: Use with trading disabled for analysis
✅ Backtesting: Enable trading to test historically
✅ Swing Trading: Ideal for 4H or higher timeframes
✅ Risk Management: Automatic SL and TP for protection
Risk Disclaimer:
This strategy is for educational and analysis purposes only. Always test in a simulation environment before using with real capital. Trading involves significant risks and may result in losses.
Description:
This strategy uses a contrarian approach based on the analysis of the previous candle to identify entry and exit points. The strategy draws horizontal reference lines at important levels of the previous candle and generates buy/sell signals based on the candle's direction.
Key Features:
🔹 Multi-Timeframe Analysis: Configurable for 1H, 2H, 3H, 4H, 6H, 12H, and 1D
🔹 Reference Lines: High, low, close, and midpoint (50%) of the previous candle
🔹 Visual Signals: Labels with prices and actions (BUY/SELL/TP)
🔹 Optional Trading: Enable/disable automatic order execution
🔹 Complete System: Automatic entry, Take Profit, and Stop Loss
🔹 Alerts: Notifications when a new candle is detected
Strategy Logic:
When the previous candle is POSITIVE:
Signal: 🔴 SELL at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🔴 High of the previous candle
When the previous candle is NEGATIVE:
Signal: 🟢 BUY at the previous candle's close
Take Profit: 🎯 Midpoint (50%) of the previous candle
Stop Loss: 🟢 Low of the previous candle
Visual Elements:
Green Line: High of the previous candle (when positive)
Red Line: Low of the previous candle (when negative)
Yellow Line: Close of the previous candle (always present)
Blue Line: Midpoint (50%) of the previous candle (always present)
Labels: Prices and actions with emojis for easy identification
Settings:
Timeframe: Default 4H (configurable)
Auto Trading: Disabled by default (safety)
Alerts: Include entry prices, TP, and SL
Recommended Usage:
✅ Visual Analysis: Use with trading disabled for analysis
✅ Backtesting: Enable trading to test historically
✅ Swing Trading: Ideal for 4H or higher timeframes
✅ Risk Management: Automatic SL and TP for protection
Risk Disclaimer:
This strategy is for educational and analysis purposes only. Always test in a simulation environment before using with real capital. Trading involves significant risks and may result in losses.
Phát hành các Ghi chú
adjustmentsMã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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ã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
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.