| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Actually, I don't think that expert is quite right. In the original code, the T3MA was calculated differently.
e1:=Mov(price,Periods,E); e2:=Mov(e1,Periods,E); e3:=Mov(e2,Periods,E); e4:=Mov(e3,Periods,E); e5:=Mov(e4,Periods,E); e6:=Mov(e5,Periods,E); Each one is a moving average of the previous one. double e1=iMA(NULL,0,Periods,0,MODE_EMA,PRICE_CLOSE,0); double e2=iMA(NULL,0,Periods,0,MODE_EMA,e1,0); double e3=iMA(NULL,0,Periods,0,MODE_EMA,e2,0); double e4=iMA(NULL,0,Periods,0,MODE_EMA,e3,0); double e5=iMA(NULL,0,Periods,0,MODE_EMA,e4,0); double e6=iMA(NULL,0,Periods,0,MODE_EMA,e5,0); In this expert, I'm not sure what these will return. Putting the previous variable into the place that's supposed to identify the type of price to use (i.e. PRICE_CLOSE, PRICE_OPEN, etc) isn't going to make a moving average of the previous variable. It's just going to be nonsense. Instead, I think you have to do something like this: double e1[]; double e2[]; double e3[]; double e4[]; double e5[]; double e6[]; for (int i=0;i<Periods;i++) e1[i]=iMA(NULL,0,Periods,0,MODE_EMA,PRICE_CLOSE,i); for (i=0;i<Periods;i++) e2[i]=iMAonArray(e1,Periods,...can't remember the other inputs to iMAonArray...) etc...repeat for each array. -lcg |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Raw Ideas | newdigital | Suggestions for Trading Systems | 729 | Yesterday 09:40 AM |
| Looking for some Fresh Ideas | Emerald King | Metatrader 4 | 3 | 01-11-2007 07:30 PM |