Errors, bugs, questions - page 671

 

Sometimes an error occurs immediately without switching the period.

I do not know how to fight it, this variant does not work either:

void OnTimer()//int 08
{
static bool b_Flag = false;

   if (b_Flag == true) return;//ret -- реентерабельность --
   b_Flag = true;//cli
   

string db_SymbolName;
//MqlRates rates[100];
int edx;
double           open_array[1];      // массив для копирования цен открытия
double           close_array[1];      // массив для копирования цен закрытия
   
   
   //---------------------------------------------
   for (int ebx = 0; ebx < ecx; ebx++){
      db_SymbolName = g_s_SymbolsTrade[ebx];
      //edx=CopyRates(db_SymbolName,_Period,0,1,rates);
      edx = 0;//xor edx,edx
      edx += CopyOpen(db_SymbolName,_Period,0,1,open_array);
      edx += CopyClose(db_SymbolName,_Period,0,1,close_array);
      if (edx != 2){//cmp edx,2 | jne
         b_Flag = false;//sti
         return;//jne ret;
      }   
   }//loop ecx       
   Print ("Загрузка завершена.");
   //---------------------------------------------
   b_Flag = false;//sti
}

One instrument per tick, even if it works too is not an option, as I load 108 pairs for InstaForex:

string g_s_SymbolsTrade[] = {"EURUSD", "GBPUSD", "USDCHF", "USDJPY", "USDCAD", "AUDUSD", "AUDCAD", "AUDCHF", "AUDJPY", "EURGBP", "EURCHF", "EURJPY", "NZDUSD", "AUDNZD,
"EURNZD", "EURCAD", "GBPAUD", "GBPCAD", "GBPNZD", "CHFJPY", "CADCHF", "CADJPY", "NZDCAD", "NZDCHF", "NZDJPY", "EURAUD", "GBPCHF", "GBPJPY", "AUDCZK", "AUDDKK", "AUDHKD"
"AUDHUF", "AUDMXN", "AUDNOK", "AUDPLN", "AUDSEK", "AUDSGD", "AUDZAR", "CADCZK", "CADDKK", "CADHKD", "CADHUF", "CADMXN", "CADNOK", "CADPLN", "CADSEK", "CADSGD", "CADZAR",
"CHFCZK", "CHFDKK", "CHFHKD", "CHFHUF", "CHFMXN", "CHFNOK", "CHFPLN", "CHFSEK", "CHFSGD", "CHFZAR", "CZKJPY", "DKKJPY", "EURCZK", "EURDKKD", "EURHUF", "EURMXN",
"EURNOK", "EURPLN", "EURSEK", "EURSGD", "EURZAR", "GBPCZK", "GBPDKK", "GBPHKD", "GBPHUF", "GBPMXN", "GBPNOK", "GBPPLN", "GBPSEK", "GBPSGD", "GBPZAR", "HKDJPY", "HUFJPY",
"MXNJPY", "NOKJPY", "NZDCZK", "NZDDKKK", "NZDHKD", "NZDHUF", "NZDMXN", "NZDNOK", "NZDPLN", "NZDSEK", "NZDSGD", "NZDZAR", "SEKJPY", "SGDJPY", "USDCZK", "USDHKD", "USDHUF",

"USDMXN", "USDPLN", "USDSGD", "ZARJPY", "USDDKK", "USDNOK", "USDRUR", "USDSEK", "USDZAR"};

By the time last pair has been loaded the bar has already changed.

Is there any other way to get Open and Close on all currency pairs within a minute?

 
pusheax:

...

Is there any other way to get Open and Close for all currency pairs within a minute?

You can get the data instantly by running a loop on all SymbolsTotal() instruments in the Market Watch window on the arrival of a tick on any of them, or every second if needed.

int  SymbolsTotal(
   bool  selected      // true – только символы в MarketWatch
   );
 
 
tol64:

You can get data instantly by running a loop on all SymbolsTotal() instruments in the Market Watch window on the arrival of a tick on any of them, or every second if needed.

I don't understand, how do I get Open and Close prices?

Could you tell me, apart from functions: CopyRates, CopyOpen and CopyClose, are there any other alternative ways of loading?

 
pusheax:
I don't understand, how do I get Open and Close prices?

Going through all symbols in the Market Watch window by index, get the symbol name usingSymbolName()

string  SymbolName(
   int   pos,          // номер в списке
   bool  selected      // true – только символы в MarketWatch
   );
And then you get the required data by the symbol name.
 
pusheax:

...

Can you tell me if there are any other alternative loading methods besides the CopyRates, CopyOpen and CopyClose functions?

Great functions. I don't know any other variants. ))) Take advantage of them.
 
Is there any way to draw the bar graph or bars together, without distance between the values? This is the case, for example, if the scale is kept to a minimum.
 
progeon:

Is there any way to draw the bar graph or bars together, without distance between the values? This is, for example, what happens if the scale is kept to a minimum.
Styles can be set like this:
#property indicator_style1 STYLE_SOLID
#property indicator_width1 2
You can also specify the chart scale and adjust line widths programmatically, depending on the scale. It is also possible to draw with a line instead of a histogram. Connect the points and fill the bottom part like it is done in this indicator: STALIN
 
pusheax:

I don't understand, how do I get the Opening and Closing prices?

Can you tell me if there are any other alternative ways of loading besides the CopyRates, CopyOpen and CopyClose functions?

How much RAM do you have on your computer?
 
MetaDriver:
How much RAM do you have on your computer?
My computer has 2gb.

I just decided not to switch timeframes. Hopefully it will work more or less stable then.

Seems to be working so far.

 
pusheax:
I have 2gb on my computer.

I just decided not to switch timeframes. Hopefully then it will work more or less stable.

So far it seems to be working.

How many bars are there in the window?

Reason: