OPEN-SOURCE SCRIPT

Daytrading ES Wick Length Strategy

This Pine Script strategy calculates the combined length of upper and lower wicks of candlesticks and uses a customizable moving average (MA) to identify potential long entry points. The strategy compares the total wick length to the MA with an added offset. If the wick length exceeds the offset-adjusted MA, the strategy enters a long position. The position is automatically closed after a user-defined holding period.

Key Features:

1. Calculates the sum of upper and lower wicks for each candlestick.
2. Offers four types of moving averages (SMA, EMA, WMA, VWMA) for analysis.
3. Allows the user to set a customizable MA length and an offset to shift the MA.
4. Automatically exits positions after a specified number of bars.
5. Visualizes the wick length as a histogram and the offset-adjusted MA as a line.

References:

• Candlestick wick analysis: Nison, S. (1991). Japanese Candlestick Charting Techniques.
• Moving averages: Brock, W., Lakonishok, J., & LeBaron, B. (1992). “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns”. Journal of Finance.

This strategy is suitable for identifying candlesticks with significant volatility and long wicks, which can indicate potential trend reversals or continuations.
Candlestick analysisChart patternsstatistics

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明