Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
Alert_BB
//+------------------------------------------------------------------+
//| Alert_BB.mq4 |
//| Kalenzo |
//| bartlomiej.gorski@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link "bartlomiej.gorski@gmail.com"
extern int range = 1;
extern int period = 20;
extern int deviation = 2;
extern int bands_shift = 0;
extern int applied_price = PRICE_CLOSE;
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----bb
double bbP = iBands(Symbol(),0,period,deviation,bands_shift,applied_price,MODE_PLUSDI,0);
double bbMid = iBands(Symbol(),0,period,deviation,bands_shift,applied_price,MODE_MAIN,0);
double bbM = iBands(Symbol(),0,period,deviation,bands_shift,applied_price,MODE_MINUSDI,0);
if( (Bid <= bbP+(range*Point)) && (Bid >= bbP-(range*Point)))
Alert(Symbol()+" Bolinger PLUS DI range reached at ",Bid);
else if( (Bid <= bbMid+(range*Point)) && (Bid >= bbMid-(range*Point)))
Alert(Symbol()+" Bolinger MID range reached at ",Bid);
else if( (Bid <= bbM+(range*Point)) && (Bid >= bbM-(range*Point)))
Alert(Symbol()+" Bolinger MINUS DI range reached at ",Bid);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---