ema cross
Indicators Used
Moving average indicator
Miscellaneous
It issuies visual alerts to the screen
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 supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---