strange result for ordersend() trading price

Back to topics list To post a new topic, please log in or register
avatar
1
domodo 2015.05.14 08:20
 

hi,guys,I'm a newbie to learn mql4,recently,I downloaded mt4 from here,registerd a demo account and try the following code on EURUSD M1,my origial goal is to know what price function OrderOpenPrice() would return when the order is pending,so the BUYSTOP order price is set to be 5000, but i got a strange result that order was dealed at 1.3608,this order shouldn't be dealed. I don't know why,but i'm sure that i missed something.any help would be appreciated.

 [code]

 int globalint1 = 0;


int start()

{

   int order;

   int total;

   int select;

   int ii;


   if ( globalint1 == 0)

   {

      order = OrderSend(NULL, OP_BUYSTOP, 1, 5000.00, 0, 4900.00, 5100.00, NULL, 0, 0, clrAqua);

      globalint1 = 1;

   }

         

   total = OrdersTotal();

   for (ii = total-1;ii>=0;ii--)

   {

      select = OrderSelect( ii, SELECT_BY_POS, MODE_TRADES );

      Print( "orderopenprice", OrderOpenPrice() );

   }

   return(0);

}


[/code] 

 

 

avatar
13009
WHRoeder 2015.05.14 14:45 #
 
domodo: BUYSTOP order price is set to be 5000, but i got a strange result that order was dealed at 1.3608,this order shouldn't be dealed. I don't know why,
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Not a code problem, the stop was placed (per your first image.) Ask your broker.
Back to topics list  

To add comments, please log in or register