Bollinger Bands Cross Arrow
Download scriptThis script is a specialized technical analysis tool designed for the MetaTrader 5 platform. It automates the visual identification of specific price actions by combining Bollinger Bands with an automated "arrow" signaling system. Instead of requiring you to manually watch for every price movement, the script calculates these levels in the background and marks important moments directly on your chart.
Core Functionality
The primary purpose of this tool is to detect when the market price "pierces" or crosses the boundaries of the Bollinger Bands. It identifies two specific types of movements:
- Down to Up Crosses: The script looks for instances where the price moves from below the lower boundary back into the band, or vice versa, depending on your sensitivity settings.
- Top to Down Crosses: Similarly, it monitors when the price moves from above the upper boundary back down into the band.
Key Features & Customization
The script is designed to be flexible, allowing you to adjust how "sensitive" the detection is through several user-adjustable parameters:
- Intersection Logic (Strict vs. Soft):
- Strict Mode: Requires the High or Low price of a candle to specifically break the boundary.
- Soft Mode: Looks at the Open and Close prices, providing a more generalized view of the movement.
- Visual Signaling: When a crossover is detected, the script automatically places an arrow on the chart. You can customize the appearance of these arrows (using Wingdings fonts) and adjust their vertical position (shift) so they do not overlap with your candles or other indicators.
- Bollinger Band Customization: You can define the standard period (how much historical data is averaged), the deviation (how wide the bands are), and which price type (Close, Open, etc.) the calculation should base itself on.
Technical Behavior
For the end-user, the logic flows as follows:
- Data Synchronization: The script continuously pulls real-time data from the Bollinger Bands indicator.
- Buffer Management: It organizes this data into "buffers"—internal memory slots that keep track of the Upper, Middle, and Lower band values simultaneously.
- Real-time Comparison: Every time a new price tick occurs, the script compares the current candle's high/low/open/close against the corresponding band values from the previous candle.
- Visual Output: If the mathematical conditions for a "cross" are met, it triggers the appearance of an arrow; otherwise, it keeps the area clear, ensuring your chart remains clean and only shows confirmed signals.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | B o l l i n g e r B a n d s C r o s s A r r o w . m q 5 |
/ / | C o p y r i g h t © 2 0 2 0 , V l a d i m i r K a r p u t o v |
/ / | h t t p s : / / w w w . m q l 5 . c o m / r u / m a r k e t / p r o d u c t / 4 3 5 1 6 |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "