[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 241

 
Zhunko:

RefreshRates () updates a copy of the data for a particular script or expert. It has nothing to do with windows.

I.e. if data has ever been requested for any tool within a script or Expert Advisor, it will be refreshed. Others will not.

Can I clarify.

Here is a part of the script running on EURUSD1

for(;;)
{
if(RefreshRate())
{

bid_EURUSD1=MarketInfo("EURUSD1",MODE_BID);
ask_EURUSD1=MarketInfo("EURUSD1",MODE_ASK);

bid_GBPUSD1=MarketInfo("GBPUSD1",MODE_BID);
ask_GBPUSD1=MarketInfo("GBPUSD1",MODE_ASK);

bid_USDCHF1=MarketInfo("USDCHF1",MODE_BID);
ask_USDCHF1=MarketInfo("USDCHF1",MODE_ASK);

bid_USDJPY1=MarketInfo("USDJPY1",MODE_BID);
ask_USDJPY1=MarketInfo("USDJPY1",MODE_ASK);
}
}

Will data update in this case only for EURUSD1 or for GBPUSD, USDCHF, USDJPY data is also updated.

Thank you

 
When requesting information from MarketInfo(), you are already receiving updated data, so RefreachRates() does not play a role in this case.
 

Thank you for your reply.

Can you tell me how to determine the time in milliseconds when a new tick appears.

 
ftrw:

May I clarify.

Here is a part of the script which is running on EURUSD1

for(;;)
{
if(RefreshRate())
{

bid_EURUSD1=MarketInfo("EURUSD1",MODE_BID);
ask_EURUSD1=MarketInfo("EURUSD1",MODE_ASK);

bid_GBPUSD1=MarketInfo("GBPUSD1",MODE_BID);
ask_GBPUSD1=MarketInfo("GBPUSD1",MODE_ASK);

bid_USDCHF1=MarketInfo("USDCHF1",MODE_BID);
ask_USDCHF1=MarketInfo("USDCHF1",MODE_ASK);

bid_USDJPY1=MarketInfo("USDJPY1",MODE_BID);
ask_USDJPY1=MarketInfo("USDJPY1",MODE_ASK);
}
}

Will there be a data update in this case only for EURUSD1 or for GBPUSD, USDCHF, USDJPY there is also a data update.

Thank you


Yes, if windows with other instruments are open (GBPUSD, USDCHF, USDJPY). Otherwise zeros are returned.
 
ftrw:

Thank you for your reply.

Can you tell me how to determine the time in milliseconds when a new tick appears.


The event of a new tick occurrence can only be detected by placing the "listening" Expert Advisor or indicator in the appropriate window with the required symbol.

Milliseconds are taken from GetTickCount

 
Roll:

Yes, if windows with other instruments are open (GBPUSD, USDCHF, USDJPY). Otherwise, zeros are returned.

It is sufficient that these instruments are present in the "Market Watch"
 
FAQ:

It is enough that these instruments are present in the "market overview"


Agreed. The answer is more precise. I suggest a software solution:

void  CheckSym(){if(ask(Symb)==0||bid(Symb)==0){MessageBox("НЕВОЗМОЖНА торговля на  "+Symb,"Внимание!",MB_OK|MB_ICONINFORMATION);return;}}
 
Roll:


I agree. The answer is more exact. I suggest a software solution:


and what are the ask(Symb) and bid(Symb) functions

 
ftrw:

what are the ask(Symb) and bid(Symb) functions


It's not hard to guess - the corresponding MarketInfo() for the required instrument.
 

One can really guess :)

Thank you all for your replies. You have been a great help.

Regards,

Yuri