GiantBarV03
Download scriptThis script is designed to act as a visual and audible monitoring tool for active traders who want to stay informed about significant price movements in real-time. Its primary purpose is to identify "Giant Bars"—large, decisive price swings that occur on the live chart—and notify you immediately when they happen.
How it Works
The tool continuously monitors the current price action of your active trading pair. It looks specifically at the difference between where the current candle opened and where it is currently trading.
If that difference exceeds a specific size (which you can customize in the settings), the script identifies the move as significant. Once a "Giant Bar" is detected, it performs the following logic:
- Directional Identification: The tool determines if the large movement is bullish (price moving up) or bearish (price moving down).
- Instant Notifications: It triggers an alert on your platform, providing you with the name of the currency pair, the current timeframe, the direction of the move, and the exact size of the move in pips.
- Smart Filtering: To prevent your workspace from being flooded with constant notifications during a single large trend, the script includes a "cooldown" mechanism. Once an alert is triggered, it will wait for a predetermined number of minutes before it allows another notification to fire.
Key Features for the User
- Customizable Sensitivity: You can set the height threshold to define what qualifies as a "Giant Bar," allowing you to filter out small market noise and focus only on major volatility.
- Customizable Alert Frequency: You can adjust how often the script is allowed to notify you, ensuring that you receive updates at a pace that suits your trading style.
- Real-Time Awareness: It works dynamically across different timeframes, making it a versatile tool whether you are scalping on small charts or swing trading on larger ones.
In essence, this script acts as an automated "eyes-on-the-market" assistant, highlighting the most impactful price actions so you don't have to watch every single tick manually.
//+------------------------------------------------------------------+
//| Giant Bar.mq4 |
//| Novice |
//| ver. 03 |
//| Robert Hill: ver. 03 - changed to work on timeframes less than |
//| hourly |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern int barsolidheight=30;
extern int alertinterval=120;
string barbody="";
int NextMinute=0;
int NextPeriod=0;
double mOpen, mClose, mDif;
double bsh;
int init()
{
bsh = barsolidheight*Point;
NextMinute = Minute();
return (0);
}
int start()
{
mClose = iClose(0,0,0);
mOpen = iOpen(0,0,0);
mDif = MathAbs(mClose - mOpen);
if(mDif > bsh)
{
if( Minute()>=NextMinute)
{
if (NextPeriod == 0)
{
if(mClose>mOpen)
barbody=" min. - BULL candle moved ";
else if(mClose < mOpen)
barbody=" min. - BEAR candle moved ";
Alert(Symbol()," ",Period(),barbody,mDif/Point," pip(s)");
NextMinute=Minute()+alertinterval;
NextPeriod = 1;
if(NextMinute>=Period()) {NextMinute-=Period();NextPeriod=0;}
}
}
}
return(0);
}
Comments