Miscellaneous
0
Views
0
Downloads
0
Favorites
NEWS ALERT
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| NEWS ALERT.mq4 |
//| Mico Yoshic |
//| micoyoshic@mail.com |
//+------------------------------------------------------------------+
#property copyright "Mico Yoshic"
#property link "www.micoyoshic.com"
//---- input parameters
extern double NormalSpread=2;
extern double NormalPipDistance=5;
double sp,dt;
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
dt=(MarketInfo(Symbol(),MODE_STOPLEVEL))-((Ask-Bid)*10000);
sp=(MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID))*10000;
if (dt>NormalPipDistance) {
Alert("The Minimum Distance from the Current Price is now ",dt," Pips for the ",Symbol()," and its BIGGER THAN NORMAL");
}
return(true);
if (MarketInfo(Symbol(),MODE_ASK)-MarketInfo(Symbol(),MODE_BID)>NormalSpread*MarketInfo(Symbol(),MODE_POINT)) {
Alert("The Spread for ",Symbol()," is now ",sp," and its BIGGER THAN NORMAL");
}
return(true);
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
---