MQL4 Learning - page 99

 

Thank you Guyver that is very nice.

Can you help me one more time please?

I want that a bye order only open, if EURO is over the slow MA + fast MA cross slow MA, and sell only if EURO is under the slow MA + fast MA cross slow MA.

rapidshare.com/files/397543053/Generic_MA_Cross_Expert.mq4.html

 

did any one can help me for code of

EMA of EMA (use price of EMA for calculation)

and i want to use

AMA (modify factor by CMO)

can anyone help me code this

 

Updated

cai:
Thank you Guyver that is very nice.

Can you help me one more time please?

I want that a bye order only open, if EURO is over the slow MA + fast MA cross slow MA, and sell only if EURO is under the slow MA + fast MA cross slow MA.

rapidshare.com/files/397543053/Generic_MA_Cross_Expert.mq4.html

OK, i updated the EA with the features. Also i left some MA periods on the ea which was used on 15TF to test settings.. you can change those after you load the EA on your MT4 Terminal.

 

What does Order Send Buy Failed Invalid Stops

Hallo Everyone:

I am new to EA programming and after creating a new EA, I am getting a message that says: Order Send Buy Failed Invalid Stops.... Does anyone know what that means?

Thanks for all the help :-)

 
forexnewbieneedshelp:
Hallo Everyone:

I am new to EA programming and after creating a new EA, I am getting a message that says: Order Send Buy Failed Invalid Stops.... Does anyone know what that means?

Thanks for all the help :-)

It means your Stoploss is very close to the current price and not allowed by the broker/terminal etc.. Maybe the EA you are using is programmed for 4 digits and these days most are 5 digits this is the most common problem

 
forexnewbieneedshelp:
Hallo Everyone:

I am new to EA programming and after creating a new EA, I am getting a message that says: Order Send Buy Failed Invalid Stops.... Does anyone know what that means?

Thanks for all the help :-)

Use print statements to output what the stop is and what the current ask/bid is then you'll see what the problem is.

If you're too close you'll have to add a check that uses STOP_LEVEL (take a look at the MarketInfo function).

Good luck

Lux

 
 
 

Guyver thanks but why is always a SL? I make no SL and the order change and makes a SL.

 
cai:
Guyver thanks but why is always a SL? I make no SL and the order change and makes a SL.

umm i am teaching you good trading habbits... rofl heh.. seriously i don't remember why i will check the code once i have sometime .. or you know what just use a large SL that should solve your prob as well

-guyver