Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
DECEMA
//Version: 1
//Time: December 03, 2006
//+------------------------------------------------------------------+
//| DECEMA |
//| DECEMA.mq4 |
//| Developed by Coders Guru |
//| http://www.xpworx.com |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| NOTE: DECEMA-a is required |
//+------------------------------------------------------------------+
#property link "http://www.xpworx.com"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int MA_Period = 15;
extern int MA_Price = PRICE_CLOSE;
double DrawBuffer[];
double StoreBuffer[];
double StoreBuffer2[];
double Buffer7[];
double Buffer8[];
double Buffer9[];
double Buffer10[];
int init()
{
IndicatorBuffers(7);
SetIndexStyle(0,DRAW_LINE, STYLE_SOLID,2);
SetIndexBuffer(0,DrawBuffer);
SetIndexBuffer(1,StoreBuffer);
SetIndexBuffer(2,StoreBuffer2);
SetIndexBuffer(3,Buffer7);
SetIndexBuffer(4,Buffer8);
SetIndexBuffer(5,Buffer9);
SetIndexBuffer(6,Buffer10);
return(0);
}
int deinit()
{
return(0);
}
void start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
limit=Bars-counted_bars-1;
for(int shift=0; shift<limit; shift++)
StoreBuffer[shift] = iCustom(NULL,0,"DECEMA-a",MA_Period,MA_Price,1,shift);
for(shift=0; shift<limit; shift++)
Buffer7[shift] = iMAOnArray(StoreBuffer,0,MA_Period,0,MODE_EMA,shift);
for(shift=0; shift<limit; shift++)
Buffer8[shift] = iMAOnArray(Buffer7,0,MA_Period,0,MODE_EMA,shift);
for(shift=0; shift<limit; shift++)
Buffer9[shift] = iMAOnArray(Buffer8,0,MA_Period,0,MODE_EMA,shift);
for(shift=0; shift<limit; shift++)
Buffer10[shift] = iMAOnArray(Buffer9,0,MA_Period,0,MODE_EMA,shift);
for(shift=0; shift<limit; shift++)
StoreBuffer2[shift] = iCustom(NULL,0,"DECEMA-a",MA_Period,MA_Price,0,shift);
//DECEMA:= (10*EMA1)-(45*EMA2)+(120*EMA3)-(210*EMA4)+(252*EMA5)-(210*EMA6)+(120*EMA7)-(45*EMA8)+(10*EMA9)-EMA10;
for(shift=0; shift<limit; shift++)
DrawBuffer[shift] = StoreBuffer2[shift] + (120*Buffer7[shift])-(45*Buffer8[shift])+(10*Buffer9[shift])- Buffer10[shift];
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
---