My EA can do nothing on Market Execution !

 

Hi every body, i am a new in EA, i wirted an EA with tragery Signal :

double Buy1_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 1);

double Buy1_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 1);

double Buy2_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

double Buy2_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

double Buy3_1 = iSAR(NULL, 0, 0.005, 0.05, Current + 1);

double Buy3_2 = iSAR(NULL, 0, 0.005, 0.05, Current + 0);

double Buy4_1 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 1);

double Buy4_2 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 0);

double Sell1_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 1);

double Sell1_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 1);

double Sell2_1 = iMA(NULL, 0, 55, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

double Sell2_2 = iMA(NULL, 0, 200, 0, MODE_EMA, PRICE_CLOSE, Current + 0);

double Sell3_1 = iSAR(NULL, 0, 0.005, 0.05, Current + 1);

double Sell3_2 = iSAR(NULL, 0, 0.005, 0.05, Current + 0);

double Sell4_1 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 1);

double Sell4_2 = iMACD(NULL, 0, 12, 26, 9, PRICE_CLOSE, MODE_SIGNAL, Current + 0);


if (Buy1_1 < Buy1_2 && Buy2_1 >= Buy2_2 && Buy3_1 < Buy3_2 && Buy4_1 < Buy4_2) Order = SIGNAL_BUY;

if (Sell1_1 > Sell1_2 && Sell2_1 <= Sell2_2 && Sell3_1 > Sell3_2 && Sell4_1 > Sell4_2) Order = SIGNAL_SELL;

But I don't understand why my EA can work fine on Instant Execution (I think so) but on market execution it do nothing, I am trader in easy-forex, Their demo account is Instant execution my EA work fine, but on live account with Market execution my EA do nothing, i mean it can not analyze chart on that MT4, not error, do nothing.

I am contact easy-forex support and they tell me because by different Instant execution and Market execution. So i find someone who have expirence about EA and trading. Please ! help me modify my EA.

Thank you so much !

 

Are easy-forex an ECN Broker ?

Read some of the posts here: http://crum.be/ecn

 
RaptorUK:

Are easy-forex an ECN Broker ?

Read some of the posts here: http://crum.be/ecn


Thanks ! but your url not available,please ! repost agian
 
Works fine now.
 
WHRoeder:
Works fine now.

Thank for you reply, same i said it not work on market execution ( or something settings, i don't know ) but it work on instant execution and only on demo account in easy-forex, i don't know why.Please ! help
 

Hi,


i got a wonderfull and powerfull dorex indicator i would like to make an EA with it, it is a arrow indicator

this are conditions:


Open Buy order If indicator is turn red to blue color.

Open Sell order if indicator turn blue to red color .

Close Buy before open the sell order.

close Sell before open the Buy order.


money managment:

takeprofit :adjustable

stop loss : adjustable

no trailing stop

maxslipage :3

order numbers :Could you make EA can make more than one orders (expamle :2,3,4....) each opened get same lotsize ( example : if EA opens 3 Buy orders with same lotsize,,Lotsize : Lot/ordernumbers)

lot :( adjustable )

, i join indicator


thank to help

 
alvintran:

Thank for you reply, same i said it not work on market execution ( or something settings, i don't know ) but it work on instant execution and only on demo account in easy-forex, i don't know why.Please ! help

WHY didn't you read any of those links. You would have gotten your answer.

On a ECN broker, you MUST open first and THEN set stops.

 

Fist thank you everybody !

Like i said, my EA have not any problem, I know problem you said, in market execution must open fist after that modify position ( if not it will show order(130) error ) . But my EA have not any problem,just do nothing.

I give you condition before open a position :

if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {

//Open buy order

}

I hope you can help me. Thanks !

 
Debug your code . . .
Reason: