BLUR71  

HMA Cross Alert?

Does Anyone have a 2-HMA Cross Alert?

Regards

golusiek  

problem with a script

i want to write a simple scirpt/expert advisor which would work constantly and would give me buy/sell signals when two moving averages cross each other.

1) should it be a script or an expert advisor?

2) what's wrong with the following code that although it compiles it doesnt give proper messages?

double ma10;

double ma20;

ma10=iMA(0,0,10,0,MODE_SMA,PRICE_CLOSE,0);

ma20=iMA(0,0,20,0,MODE_SMA,PRICE_CLOSE,0);

if (ma10<ma20)

{

while (ma10<ma20)

{

ma10=iMA(0,0,10,0,MODE_SMA,PRICE_CLOSE,0);

ma20=iMA(0,0,20,0,MODE_SMA,PRICE_CLOSE,0);

}

if (ma10>=ma20)

{

MessageBox("Kupuj albo sprzedaj!!!");

}

}

if (ma10>ma20)

{

while (ma10>ma20)

{

ma10=iMA(0,0,10,0,MODE_SMA,PRICE_CLOSE,0);

ma20=iMA(0,0,20,0,MODE_SMA,PRICE_CLOSE,0);

}

if (ma10<=ma20)

{

MessageBox("Kupuj albo sprzedaj!!!");

}

}

thank you for your answer

[Deleted]  

Hi Fxbs , Linuxser,

I have tried to create a MA cross indicator with alert but I failed.I compared different codes with similar crosses with alert(WMA cross,EMAcross etc..) still no success.I would appreciate if yous can help.Thanks in advance.

Files:
snake.mq4  4 kb
t3_clean.mq4  6 kb
Linuxser  
mystified:
Hi Fxbs , Linuxser, I have tried to create a MA cross indicator with alert but I failed.I compared different codes with similar crosses with alert(WMA cross,EMAcross etc..) still no success.I would appreciate if yous can help.Thanks in advance.

Snake crossing T3 and vice versa?

Files:
[Deleted]  

Thanks Linuxer ,

Yes it is Snake crossing T3.But I am using T3_ clean MA the one Mladen coded.I think It is the fastest with no overshooting problem and the smoothest out of Tilson MA's .İs that the EA in your picture? Thanks in advance.

[Deleted]  

thanks a lot Linuxser , you are a star.

Linuxser  
mystified:
Thanks Linuxer , Yes it is Snake crossing T3.But I am using T3_ clean MA the one Mladen coded.I think It is the fastest with no overshooting problem and the smoothest out of Tilson MA's .İs that the EA in your picture? Thanks in advance.

Ok, this is the beta.

I need to make something for "inverse" option to work. Inverse would be exactly that because the idea it's to make an Universal MA cross code. That's why the name UNIversal Cross.

I Was looking for an easy code that also let's people with few knowledge about mql4 (As I) to change a few parameters and setup as desire, like AMA crossing EMA, FRAMA crossing TEMA and son on.

Kalenzo's code in which I based this indi is the most simple.

Please, test if everything is ok.

Files:
n3sve1k4s  
Linuxser:
Ok, this is the beta.

I need to make something for "inverse" option to work. Inverse would be exactly that because the idea it's to make an Universal MA cross code. That's why the name UNIversal Cross.

I Was looking for an easy code that also let's people with few knowledge about mql4 (As I) to change a few parameters and setup as desire, like AMA crossing EMA, FRAMA crossing TEMA and son on.

Kalenzo's code in which I based this indi is the most simple.

Please, test if everything is ok.

does it repaints?