Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2007, 02:38 PM
qq1 qq1 is offline
Member
 
Join Date: Jan 2007
Posts: 49
qq1 is on a distinguished road
Handling Requotes

On Live account, I have found that certain brokers give requotes, when that happens the trade is not opened. I have done a search to find how to deal with this problem.

One suggestion was to put in a value for slippage=5 or large. However this does not seem to work, the trade still not opened.

Another suggestion was to use a loop to retry the OrderSend a number of times.

I would like to find out if there are other ideas to deal with the requote problem.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 07-10-2007, 03:36 PM
Senior Member
 
Join Date: Jun 2006
Posts: 1,512
prasxz is on a distinguished road
hi

Quote:
Originally Posted by qq1 View Post
On Live account, I have found that certain brokers give requotes, when that happens the trade is not opened. I have done a search to find how to deal with this problem.

One suggestion was to put in a value for slippage=5 or large. However this does not seem to work, the trade still not opened.

Another suggestion was to use a loop to retry the OrderSend a number of times.

I would like to find out if there are other ideas to deal with the requote problem.

Thanks
Did u mean after you click OK on requote form there's nothing happen ?
I think the problem lies in their server side ..just give them complaint about this ..

===================
Forex Indicators Collection
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 07-10-2007, 03:48 PM
qq1 qq1 is offline
Member
 
Join Date: Jan 2007
Posts: 49
qq1 is on a distinguished road
Quote:
Originally Posted by prasxz View Post
Did u mean after you click OK on requote form there's nothing happen ?
I think the problem lies in their server side ..just give them complaint about this ..

===================
Forex Indicators Collection
No, I mean how to handle requote in MQ4.
EA tried to open trade with OrderSend but due to requote the trade is not opened.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 07-14-2007, 09:47 PM
Kurka Fund's Avatar
Senior Member
 
Join Date: Sep 2006
Location: San Diego
Posts: 138
Kurka Fund is on a distinguished road
Here is a good order send function that handles errors.... set the O_ variables and call SendOrder();


PHP Code:

 void SendOrder
(){
      
int ticket=0;
      
int err=0;
      
int c 0;
      
int Attempts 100;
      
      for(
Attempts >= 0c--){
            
HealthCheck(); // check to make sure EA is running correctly
            
RefreshRates();
            
ticket=OrderSend(O_Symbol,O_Type,O_Lots,O_OpenPrice,O_Slippage,O_StopLoss,O_TakeProfit,O_String,O_Magic,O_Exp,O_Color);
            if (
ticket 0) {Print(" Order Symbol : "O_Symbol," Order Type : "O_Type," Lots : "O_Lots," Open Price : "O_OpenPrice," Slippage : "O_Slippage," Stop Loss : "O_StopLoss," Take Profit : "O_TakeProfit," "O_String," Order Magic : "O_Magic," Order Exp : "O_Exp," Order Color : "O_Color," Open Time : "OrderOpenTime()," EA Took ",GetTickCount() - TickStart," milliseconds" );break;}
            
err=GetLastError();
            if(
err==|| err==|| err==||err==|| err==|| err==|| err==64 || err==128 || err==132 || err==133 || err==137 || err==139 || err==141 || err==146){ //Sleep and retry errors
               
Print("....................... Sleep And Retry Error Code= "err," "ErrorDescription(err));
               
Sleep(10);
               continue;
               }
            if(
err==135 || err==136 || err== 138){ // price change errors
               
Print ("..................Invalid Price " O_String " ..............");
               
WindowScreenShot("S_REQUOTE_"+Month()+"_D"+Day()+"_H"+Hour()+"_M"+Minute()+"_S"+Seconds()+".gif",1440,900);
               Print(
"....................... Price Error Code= "err," "ErrorDescription(err));
               
start();//restart and make sure that new price meets our entry criteria
               
break;
               }
            else{ 
// other errors
               
Print(".......................Error Code= "err," "ErrorDescription(err));
               break;
               }
          }
    } 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
handling variable market conditions. TyphoonTycoon General Discussion 6 07-19-2006 06:12 AM
Live EA and Requotes smeden General Discussion 3 03-03-2006 06:33 AM


All times are GMT. The time now is 06:16 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.