Please do not use this rudimentary script to lose money. As far as I can tell it has ZERO EDGE on its own.
Supply and Demand Pattern Detection Script
Overview This script identifies potential supply and demand zones by detecting a specific double-wick pattern formation. It's designed as an educational tool and research aid for traders interested in price action and supply/demand concepts.
Pattern Detection
Looks for consecutive candles with long wicks (tails) that align with each other
The wicks must be larger than a specified percentile of recent wick lengths
The candle bodies must be relatively small compared to their wicks
Volume and volatility filters can be optionally applied
Higher timeframe trend confirmation is available as an optional filter
Visual Aids
Green triangles appear when a long setup is detected
Red triangles appear when a short setup is detected
Boxes show the risk zone (red) and reward zone (green)
Boxes extend until the trade reaches either its target or stop loss
A performance table shows win rate and profit factor statistics
Key Settings
1. Pattern Detection:
Wick Alignment Tolerance: How closely the wicks need to align
Min Wick Length Percentile: Minimum size requirement for wicks
Max Body/Wick Ratio: Controls maximum candle body size relative to wick
Bars to Wait for Outcome: How long to track trade results
Important Disclaimers
This is an educational tool and should NOT be used to trade real money without extensive testing and modification. Please do not use this rudimentary script to lose money. As far as I can tell it has zero edge on its own.
Historical backtesting results are not indicative of future performance. The script may miss some valid setups or generate false signals. Trade outcomes are simplified and don't account for:
Slippage
Trading fees
Market liquidity
Gap risk
Real-world execution challenges
Recommended Usage
Use as a learning tool to understand supply/demand concepts
Practice identifying these patterns manually
Paper trade the setups first
Combine with other forms of analysis and risk management
Consider it one tool among many, not a complete trading system
Best Practices
Always use proper risk management
Test thoroughly on demo accounts first
Keep detailed trading logs
Understand why each pattern forms
Study both winning and losing trades to improve pattern recognition
Remember: No trading script can guarantee profits. This tool is meant for educational purposes and should be part of a broader trading education and development process.