How to know requote new price. - page 2

 
You got me mixed with somebody else. That's not my code. I know how to loop on executions with new data, thats not the question, and it's quite trivial. The question is - when you get a requote error from the server you also get a new price quote. You can see this in the mt4 journal log. Is there any way to read this new price quote that was sent by the broker? I know I can read the LATEST price quote, but I want to read this price quote specifically. Can it be done and how?
 

Sorry Gordon, i was trying to fix your problem...not answer your question, my apology....

I never heard of using the requote value for new Bid or Ask ..Good Luck

 

I often get this problem too, i.e. repeated requotes even though I use RefreshRates() before any call to OrderSend or OrderClose.

It seems that RefreshRates() often does not update the Bid or Ask variables to the same price as the new requote price.

So, we need a way to know the new requote price that the broker will accept.


Is there a solution?

 
The only solution is telling brokers stop messing with your account, and turn "sh1t" off on their server..
 

when this



int start()
  {
//----

//----
   int ticket=OrderSend(Symbol(),OP_SELL,0.3,Bid,3,0,0,"Sell half",255,0,CLR_NONE);
   if(ticket<1)
     {
      int error=GetLastError();
      Print("Error = ",ErrorDescription(error));
      return;
     }
//----
   OrderPrint();
   return(0);
  }
//+------------------------------------------------------------------+

is the sell code and this is the sell script....


int start()
  {
   bool   result;
   double price;
   int    cmd,error;
//----
   if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES))
     {
      cmd=OrderType();
      //---- first order is buy or sell
      if(cmd==OP_BUY || cmd==OP_SELL)
        {
         while(true)
           {
            if(cmd==OP_BUY) price=Bid;
            else            price=Ask;
            result=OrderClose(OrderTicket(),OrderLots(),price,3,CLR_NONE);
            if(result!=TRUE) { error=GetLastError(); Print("LastError = ",error); }
            else error=0;
            if(error==135) RefreshRates();
            else break;
           }
        }
     }
   else Print( "Error when order select ", GetLastError());
//----
   return(0);
  }
//+------------------------------------------------------------------+



how can i tweak the code with your advise ???


please help me

Reason: