OPEN-SOURCE SCRIPT
Cập nhật [blackcat] L1 N-Shape Attack

Level 1
Background
At the beginning of the stock price rise, the stock form is a buying point in the "N" shape.
Function
This form is the same as the "N" shape. What is pursued is the strength of the skyrocketing rise after the sharp rise and fall. The adjustment time in the middle of the N shape must not exceed 3-4 days! If it is an aggressive Changyang, the total adjustment cycle must not exceed 5 days. A simple summary is: skyrocketing + quick callback + skyrocketing again! There has been a solid sun candle in the early stage, and a real sun candle appeared again after a few days of adjustment.
Key points of the N-shaped attack pattern:
1. The shorter the adjustment time, the better, indicating that individual stocks are already quite strong, and the rush to raise funds is quite obvious. It is best to only adjust for 1 day. The most extreme is a big rise and then a big fall and then a big rise. This is the most ideal. Adjust on 2 days and then follow. It is best to adjust the number of days below 5 days. The longer the adjustment time, the less obvious the effect.
2. The smaller the adjustment range, the better, and it is better if the lowest point during the adjustment period does not fall below the lowest point of the previous big rising candle.
3. It is more ideal if the closing price of the latter surge is higher than the highest price of the previous surge, and it is even more ideal if it exceeds the height of the adjustment period.
4. When selecting stocks, try to select stocks whose 20-day and 60-day moving averages have started to rise, preferably in a long-term arrangement.
Market logic of N-shaped attack:
The main force took advantage of the opportunity to pull out the first big positive candle in the early stage, and then took advantage of the profit taking or the index pullback, and there was a rapid 1-3 day downward kill, just returning to the initial position of the previous big positive candle, and then increased the volume again Rising to new highs.
Remarks
The long signal frequency is low.
Feedbacks are appreciated.
Background
At the beginning of the stock price rise, the stock form is a buying point in the "N" shape.
Function
This form is the same as the "N" shape. What is pursued is the strength of the skyrocketing rise after the sharp rise and fall. The adjustment time in the middle of the N shape must not exceed 3-4 days! If it is an aggressive Changyang, the total adjustment cycle must not exceed 5 days. A simple summary is: skyrocketing + quick callback + skyrocketing again! There has been a solid sun candle in the early stage, and a real sun candle appeared again after a few days of adjustment.
Key points of the N-shaped attack pattern:
1. The shorter the adjustment time, the better, indicating that individual stocks are already quite strong, and the rush to raise funds is quite obvious. It is best to only adjust for 1 day. The most extreme is a big rise and then a big fall and then a big rise. This is the most ideal. Adjust on 2 days and then follow. It is best to adjust the number of days below 5 days. The longer the adjustment time, the less obvious the effect.
2. The smaller the adjustment range, the better, and it is better if the lowest point during the adjustment period does not fall below the lowest point of the previous big rising candle.
3. It is more ideal if the closing price of the latter surge is higher than the highest price of the previous surge, and it is even more ideal if it exceeds the height of the adjustment period.
4. When selecting stocks, try to select stocks whose 20-day and 60-day moving averages have started to rise, preferably in a long-term arrangement.
Market logic of N-shaped attack:
The main force took advantage of the opportunity to pull out the first big positive candle in the early stage, and then took advantage of the profit taking or the index pullback, and there was a rapid 1-3 day downward kill, just returning to the initial position of the previous big positive candle, and then increased the volume again Rising to new highs.
Remarks
The long signal frequency is low.
Feedbacks are appreciated.
Phát hành các Ghi chú
OVERVIEWThe L1 N-Shape Attack indicator identifies potential reversal patterns using a combination of price action analysis and statistical calculations. It specifically targets situations where a sudden upward movement ("surge") occurs after a period of consolidation, followed by a characteristic "N-shape" pattern formation. The strategy employs custom functions for smoothing data (XSA), finding non-null values (XRF), and counting conditions (XCN) to accurately detect these setups.
FEATURES
• Surge Detection: Identifies significant upward movements exceeding a configurable threshold (default: 9.8%)
• Pattern Recognition: Looks for specific candlestick formations resembling an "N-shape"
• Volume Analysis: Incorporates volume-based confirmation through price movement ratios
• Custom Functions: Utilizes specialized mathematical functions for precise calculations
• Real-time Alerts: Generates alerts when N-Shape Attack patterns are detected
HOW TO USE
Apply the indicator to your chart by selecting L1 N-Shape Attack
Adjust the surge_threshold parameter based on market volatility: • Lower settings (8-10%) for volatile markets • Higher settings (10-12%) for stable markets
Monitor the chart for orange labels indicating confirmed N-Shape Attack signals
Combine with additional filters like moving averages or RSI for more robust trading decisions
LIMITATIONS
⚠️ This indicator should be used as part of a comprehensive trading strategy
⚠️ Not suitable for automated trading without additional risk management rules
⚠️ May generate false signals during highly volatile periods
⚠️ Best suited for experienced traders who understand price action principles
NOTES
• The indicator focuses on short-term reversals and may not work well in trending markets
• Consider backtesting before applying to live trading scenarios
• Always use proper position sizing and stop-loss orders
• For educational purposes only; do not rely solely on this indicator for decision-making
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội Quy.
Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.