Forex
Google

Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-06-2006, 10:37 PM
caldolegare caldolegare is offline
Junior Member
 
Join Date: Nov 2005
Posts: 26
caldolegare is an unknown quantity at this point
Update Ask/Bid

I have a loop that only exits when my Ask/Bid price meets certain criteria. The problem is that they values don't change. How can I update to current Ask/Bid in my loop?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-07-2006, 07:37 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by caldolegare
I have a loop that only exits when my Ask/Bid price meets certain criteria. The problem is that they values don't change. How can I update to current Ask/Bid in my loop?
Show us the code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-07-2006, 01:13 PM
caldolegare caldolegare is offline
Junior Member
 
Join Date: Nov 2005
Posts: 26
caldolegare is an unknown quantity at this point
I don't have the code with me now but I can give you a general idea.

double var = Ask+15*Point;

while(Ask!=var)
{
running code here that works
}

I just need to know how to keep the Ask price updating
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-08-2006, 12:04 AM
cockeyedcowboy's Avatar
cockeyedcowboy cockeyedcowboy is offline
Senior Member
 
Join Date: Nov 2005
Posts: 267
cockeyedcowboy is on a distinguished road
caldolegare


Try

bool RefreshRates( )


Refreshing data in the built-in variables and series arrays. This function is used when expert advisor calculates for a long time and needs refreshing data. Returns true if data are refreshed, otherwise false.

OR

use get MarketInf() function to retreive price on each loop.


Market information identifiers

Market information identifiers, used with MarketInfo() function.
It can be any of the following values:

Constant Value Description
MODE_LOW 1 Low day price.
MODE_HIGH 2 High day price.
MODE_TIME 5 The last incoming quotation time.
MODE_BID 9 Last incoming bid price.
MODE_ASK 10 Last incoming ask price.
MODE_POINT 11 Point size.
MODE_DIGITS 12 Digits after decimal point.
MODE_SPREAD 13 Spread value in points.
MODE_STOPLEVEL 14 Stop level in points.
MODE_LOTSIZE 15 Lot size in the base currency.
MODE_TICKVALUE 16 Tick value.
MODE_TICKSIZE 17 Tick size.
MODE_SWAPLONG 18 Swap of the long position.
MODE_SWAPSHORT 19 Swap of the short position.
MODE_STARTING 20 Market starting date (usually used for future markets).
MODE_EXPIRATION 21 Market expiration date (usually used for future markets).
MODE_TRADEALLOWED 22 Trade is allowed for the symbol.
MODE_MINLOT 22 The minimum lot size in points.
MODE_LOTSTEP 22 Step for changing lots in points.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridMaster Update Spider4896 Expert Advisors - Metatrader 4 18 06-05-2007 01:52 PM
Please Firedave! Update Universal Ma!! giraia_br General Discussion 1 08-24-2006 02:05 AM
Warning : Do not update to 187 ahwai General Discussion 27 03-19-2006 04:04 PM


All times are GMT. The time now is 10:28 PM.