How to get every last Bid price, fastest way

Back to topics list To post a new topic, please log in or register
avatar
170
01005379 2016.07.29 22:25
 

Hello!

 I would like to know how to get every last Bid price of EURUSD, GBPUSD and EURGBP on EURUSD chart.

For now I have: 

double EU1 = MarketInfo("EURUSD",MODE_BID);
double GU1 = MarketInfo("GBPUSD",MODE_BID);
double EG1 = MarketInfo("EURGBP",MODE_BID);

 

but I think this is faster:

double EU1 = Bid;
double GU1 = MarketInfo("GBPUSD",MODE_BID);
double EG1 = MarketInfo("EURGBP",MODE_BID);

 

Is with iClose faster? Like this:

 double EU1=iClose("EURUSD",PERIOD_H1,0);
 double GU1=iClose("GBPUSD",PERIOD_H1,0);
 double EG1=iClose("EURGBP",PERIOD_H1,0);

What do you think is the faster way when using for calculation? 

avatar
13001
WHRoeder 2016.07.30 14:39 #
 
You are getting values over the network, taking tens or hundreds of milliseconds at best. The difference between those methods will be in nanoseconds. Irrelevant.
avatar
170
01005379 2016.07.30 15:02 #
 
Thank you! Can you tell me how can I "run" indicator every second or all the time? Now it updates values only on tick change on chart where it is attached. And solution?
avatar
13001
WHRoeder 2016.07.30 22:27 #
 
Why would you want to run it when nothing has changed?
avatar
170
01005379 2016.07.31 12:10 #
 
Prices of other pairs may change and because of this calculations I need also.
avatar
1215
ggekko 2016.07.31 13:35 #
 
Use this.
Back to topics list  

To add comments, please log in or register