Elite indicators :) - page 82

 

...

this would be the simplest way :

//+------------------------------------------------------------------+

//| Ema.mq4 |

//+------------------------------------------------------------------+

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 Red

extern int EmaPrice = PRICE_CLOSE;

extern int EmaPeriod = 14;

double EmaBuffer[];

double EmaCoef;

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

int init()

{

SetIndexBuffer(0,EmaBuffer);

EmaCoef = 2.0 / (1.0+EmaPeriod);

return(0);

}

int deinit()

{

return(0);

}

int start()

{

int counted_bars=IndicatorCounted();

int i,limit;

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit = Bars-counted_bars;

for (i=limit; i>=0; i--)

{

double price = iMA(NULL,0,1,0,MODE_SMA,EmaPrice,i);

if (i>=(Bars-1))

EmaBuffer = price;

else EmaBuffer = EmaBuffer+EmaCoef*(price-EmaBuffer);

}

return(0);

}
Rayche:
Hello, Does anyone know where I can download a straight-up Exponential Moving Average indicator, without any bells and whistles? I've looked in my Metatrader platform indicator files, but can only see simple moving average indicators there. Thanks in advance.
 
Rayche:
Hello, Does anyone know where I can download a straight-up Exponential Moving Average indicator, without any bells and whistles? I've looked in my Metatrader platform indicator files, but can only see simple moving average indicators there. Thanks in advance.

Or...you can drag the Moving Average indicator (standard in MT4 package) onto the chart, and a dialog box will pop up. Select "Exponential" in the box called "MA Method".

Or is that too many bells & whistles?

 
igorad:
Updated version of AdvancedAMA with implemented Jurik FD (ER_mode=1). For color mode I suggest to use ColorBarBack =0 or 1 only.

Thanks a lot İgor , I much appreciate your work.

 
eKetas:
Hi,

Thank you guys for peace of art indicators.

I really like HMA , AllAverages and AllTrendEnvelopes, but i have faced a problem, when i want to use MTF option on range bar chart, then this doesn't work.

Maybe someone knows a solution for that problem?

maybe with some pics we can help you

 

İs this the Nicolellis Range Bars ?The indicators supposed to adjust the range bars correct?

 

Hma

kiasom:
fine work mladen, thanks, and I already had a couple of nicer weekends...

Have been compairing your HMA's to a Gaussian filter, as well as the Nonlag MA's, and the HMA has some advantage over these due to its smoothness.

So, it is a great indicator for building an EA, where the change of trend direction need to be as distinct as possible. The EA will have a multi-TF recognition and evaluation of trend and will use the One-sided Gaussian library for the SL and TP levels - again thanks to mladen.

I started to put this system together, and the EA is working in a first test version. However, when backtesting it's rather slow. It seems the reason is that the EA loads and then unloads the HMA for each call. It looks like this in the 'Journal' tab in the Tester:

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: removed

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: loaded successfully

And this is repeatedfor each and every call of the HMA, i.e for each bar.

The cause of this is in the HMA.mq4, I've tried two variants of EA's for calling the HMA , but they both have the same problem. I tried to isolate it in the HMA code, but haven't found the cause.

Any hints on what to change in the code would be gratefully accepted!

Hi Kiasom,

Have you tried the AllAverages v2.5.mq4?

You can choose all possible MA's that I know with the settings.

Just my thought.

Regards

Antomi

 

fine work mladen, thanks, and I already had a couple of nicer weekends...

Have been compairing your HMA's to a Gaussian filter, as well as the Nonlag MA's, and the HMA has some advantage over these due to its smoothness.

So, it is a great indicator for building an EA, where the change of trend direction need to be as distinct as possible. The EA will have a multi-TF recognition and evaluation of trend and will use the One-sided Gaussian library for the SL and TP levels - again thanks to mladen.

I started to put this system together, and the EA is working in a first test version. However, when backtesting it's rather slow. It seems the reason is that the EA loads and then unloads the HMA for each call. It looks like this in the 'Journal' tab in the Tester:

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: removed

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: loaded successfully

And this is repeatedfor each and every call of the HMA, i.e for each bar.

The cause of this is in the HMA.mq4, I've tried two variants of EA's for calling the HMA , but they both have the same problem. I tried to isolate it in the HMA code, but haven't found the cause.

Only hypothesis is that it's got to do with the iCustom function.

Any hints on what to change in the code would be gratefully accepted!

 

Calling HMA

fine work mladen, thanks, and I already had a couple of nicer weekends...

Have been compairing your HMA's to a Gaussian filter, as well as the Nonlag MA's, and the HMA has some advantage over these due to its smoothness.

So, it is a great indicator for building an EA, where the change of trend direction need to be as distinct as possible. The EA will have a multi-TF recognition and evaluation of trend and will use the One-sided Gaussian library for the SL and TP levels - again thanks to mladen.

I started to put this system together, and the EA is working in a first test version. However, when backtesting it's rather slow. It seems the reason is that the EA loads and then unloads the HMA for each call. It looks like this in the 'Journal' tab in the Tester:

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: removed

2009.06.29 01:01:37 2009.06.16 15:20 HMA EURUSD,M5: loaded successfully

And this is repeated for each and every call of the HMA, i.e for each bar.

The cause of this is in the HMA.mq4, I've tried two variants of EA's for calling the HMA , but they both have the same problem. I tried to isolate it in the HMA code, but haven't found the cause.

Only hypothesis is that it's got to do with the iCustom function.

Any hints on what to change in the code would be gratefully accepted!

If I remember right you may need to use::: iCustom(NULL,timeFrame,IndicatorFileName,"calculateHMA",HMAPeriod,HMAPrice,HMAMethod,0,0);, to call this HMA but better for Mladen to verify though.

edit:: calculateHMA supposed to be one word for some reason when pasting then posting it separated!!

 

Thanks a lot Antomi.

I tried it, works nicely. Also solved another issue I had, to use the Heiken Ashi prices, for increased smoothness (avoiding false signals).

But where do I find AllAverages v2.5.mq4?

The last version I found was 2.3

By all means, the Allaverages is a superb facilitator.

 

...

kiasom, mrtools is right

But, just for the sake of speed, why don't you use some "simple" HMA in an EA? The HMA you are trying to use is doing it's job as it should (it calls itself multiple times to complete that job), but at some speed costs which does not make it very suitable for EAs.

Just in case, attached one HMA version that I use for eas. Nothing special, but also nothing more than what is needed by the ea

Files:
hma.forea.mq4  2 kb
Reason: