[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 52

 
gramp >> :

>> how do I make the alerts go in order?

Make some kind of critical section or output the alerts in one block.

 

hello.

Question if there is an indicator that gives a sound signal at the opening of a new bar (options are 15 min, 30 min...)? If so, send me a link.

Thanks in advance!

 
Kostay писал(а) >>

Hello.

Question if there is an indicator that gives a sound signal at the opening of a new bar (options are 15 min, 30 min...)? If so, send me a link.

Thanks in advance!

//+------------------------------------------------------------------+
//|  возвращает признак появления нового бара для указанного периода |
//+------------------------------------------------------------------+
bool isNewBar(int timeFrame)
   {
   bool res=false;
   
   // массив содержит время открытия текущего (нулевого) бара
   // по 7 (семь) таймфреймам
   static datetime _sTime[7];  
   int i=6;

   switch ( timeFrame) 
      {
      case 1  : i=0; break;
      case 5  : i=2; break;
      case 15 : i=3; break;
      case 30 : i=4; break;
      case 60 : i=5; break;
      case 240: break;
      case 1440:break;
      default:  timeFrame = 1440;
      }
//----
   if (_sTime[ i]==0 || _sTime[ i]!=iTime(Symbol(), timeFrame,0))
      {
      _sTime[ i] = iTime(Symbol(), timeFrame,0);
      res=true;
      }
      
//----
   return( res);   
   }

if(isNewBar(15)) {sound};

 
Reshetov писал(а) >>
teetrinker wrote(a) >>

Good afternoon

Please explain how to interpret this passage in the FileOpen tutorial

===

The contents of the entries in the files

With any combination of modes, data records are written to the file without gaps. When files are formed in FILE_BIN mode, data records are written consecutively. Depending on the type of data written to the file (and the recording functions used for this purpose), a combination of end-of-line characters ("\r\n") may be written between groups of records. When files are generated in FILE_CSV mode, data records are separated with a file delimiter (usually ';'), and groups of records (consisting of strings) are separated with a combination of end-of-line characters ("\r\n").

===

everything is clearwith "int FileOpen(string filename, int mode, int delimiter=';')".

where to put ("\r\n") ? can it be used with FILE_CSV ?

Nowhere. The manual says in clear Russian: "groups of records (making up strings) are separated by a combination of line-end characters ("\r\n")".

I don't understand this exact sentence... what exactly does "groups of records (making up a string) are separated with a combination of end-of-line characters ("\r\n")" mean? What groups of records are there and "what combination of end-of-line characters" ? Thanks...

 
TheXpert писал(а) >>

Make a semblance of a critical section or output the alerts in one block.

is it normal for the log to be out of order?

 
gramp >> :

is it normal for the magazine to be out of order?

Tester is not displaying all prints and alerts to save resources, hence the discrepancy. If you open the log file and look there, everything is fine.

 

For the particularly gifted who can't read:


teetrinker >> :

I don't understand this exact sentence...

what exactly means "groups of records (making up strings) are separated by a combination of end-of-line characters ("\r\n")"?

If you don't understand it, it doesn't mean you don't understand it, it means you're incompetent.


>> :

what groups of records are there?

groups of line item records


teetrinker >> :


which end-of-line character combinations" ?

\r\n
 
komposter писал(а) >>

The tester does not output all the prints and alerts to save resources, hence the variation. If you open the log file and look there, everything is fine.

figured it out - visualization should be set to slow speed, then everything in order, on 32 is a mess

 
Reshetov писал(а) >> If you don't understand it, it doesn't mean it's incomprehensible, it means you're incompetent.
no one is arguing about competence. yes, i am incompetent, that's why i ask the question. did i mention that it's not clear? i just don't understand what it says, that's why i ask... or is this the wrong thread?
 

This is the kind of thing that's planned

SendMail("","Balanse "+AccountBalance()+
", Total Orders " +OrdersHistoryTotal()+
", Open Orders "+OrdersTotal()+
", Profit "+AccountProfit()+
", Equity " +AccountEquity()+
", Margin "+AccountFreeMargin()+", "+AccountMargin());

and when it all works, comes the price values with 8 decimal places (balance for example 5000$ it comes 5000.00000000) and all other values the same way, how to round off and, for example, 5000.00?
Reason: