Need Help with hedging ea

 

Ok im almost gave it up

but how can i execute an order instant ?

always when im firing the ea up it takes some times before the orders executes.

is there a way to execute the orders instantly ?

here is the code

code begin

RefreshRates();

OrderSend(Sym_1,OP_BUY,Lots,MarketInfo(Sym_1,MODE_ASK),Slippage,0,MarketInfo(Sym_1,MODE_ASK)+1000*Point,"Hedging",1234,0,Green);

RefreshRates();

OrderSend(Sym_2,OP_BUY,Lots,MarketInfo(Sym_2,MODE_ASK),Slippage,0,MarketInfo(Sym_2,MODE_ASK)+1000*Point,"Hedging",1234,0,Green);

code end

also how should i do to close the above orders at the same time instantly

hope someone can help me out

 

Not sure what you're asking here.

When you use the function: OrderSend() with a standard OP_BUY or OP_SELL it is instant. Same with the others, but of course they will only be "valid" once the price hits whatever you've set it to.

 
zleepan:

also how should i do to close the above orders at the same time instantly

hope someone can help me out

Try this script.

 

thanks

im trying to create a hedging ea

that when the hedge is in profit it should close it and directly open another trade.