problem with buy order.

 

i wanted to execute a buy but cannot with the code below. my broker need 25 pips from market price, but i already set to 25 and still cannot, why? please help.

=OrderSend(Symbol(),OP_BUY,1,Ask,3,Ask-25*Point,Ask+25*Point,"My order #2",16384,0,Green);

 

Ask-25*Point is not 25Pips avay from market price.

use Bid-25*Point..

but generally you should use

Bid-(MarketInfo(Symbol(),MODE_MIN_STOPLEVEL)*Point)
 
zzuegg:

Ask-25*Point is not 25Pips avay from market price.

use Bid-25*Point..

but generally you should use


if for sell mode?

is it....... Ask-(MarketInfo(Symbol(),MODE_MIN_STOPLEVEL)*Point)

 
zzuegg:

Ask-25*Point is not 25Pips avay from market price.

use Bid-25*Point..

but generally you should use


the MODE_MIN_STOPLEVEL is what?

 
joelloh:


the MODE_MIN_STOPLEVEL is what?

https://docs.mql4.com/constants/marketinfo

it's MODE_STOPLEVEL instead of MODE_MIN_STOPLEVEL

 

for stoploss and sell it should be

Ask + (MarketInfo(Symbol(),MODE_STOPLEVEL)*Point)