Indicators Used
Miscellaneous
2
Views
0
Downloads
0
Favorites
ema cross
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//---- input parameters
extern int FastEMA=5;
extern int SlowEMA=6;
double EMA1,EMA2,EMA3,EMA4;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int start()
{
EMA1=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,0);
EMA2=iMA(NULL,0,6,0,MODE_EMA,PRICE_CLOSE,0);
EMA3=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,1);
EMA4=iMA(NULL,0,6,0,MODE_EMA,PRICE_CLOSE,1);
if (EMA1 > EMA2 && EMA3 < EMA4)
{
Alert("",Symbol());
}
if (EMA2 > EMA1 && EMA4 < EMA3)
{
Alert("",Symbol());
}
//----
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
---