Indicators Used
2
Views
0
Downloads
0
Favorites
TrendEMA
//+------------------------------------------------------------------+
//| TrendEMA.mq4 |
//| FxPars |
//| http://www.fxpars.com |
//+------------------------------------------------------------------+
#property copyright "FxPars"
#property link "http://www.fxpars.com"
#property indicator_chart_window
extern int LargeEMA=100;
extern int MediumEMA=10;
extern int LowEMA=5;
double Lma=0;
double Mma=0;
double Nma=0;
double pp=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
Lma=iMA(NULL,PERIOD_H1,LargeEMA,0,MODE_EMA,PRICE_CLOSE,1);
Mma=iMA(NULL,PERIOD_H1,MediumEMA,0,MODE_EMA,PRICE_CLOSE,1);
Nma=iMA(NULL,PERIOD_H1,LowEMA,0,MODE_EMA,PRICE_CLOSE,1);
if (Lma>Mma && Mma>Nma) {
Comment("DownTrend " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma);
} else if (Lma<Mma && Mma<Nma) {
Comment("UpTrend " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma);
} else {
Comment("Sideway " + "\nLargeEMA= " + Lma + "\nMediumEMA= " + Mma + "\nLowEMA= " + Nma);
}
//----
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
---