Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 575

 
Good day. I have a problem with owl that opens a position and keeps on working, i.e. the comment is updated there says it's time to close but no action, does not close and does not open a new one. Or everything is standard and I just ....
 
abdul1:

Dear programmers, help please!!!

the problem is that this script doesn't work after the last mt update. the bars are still missing.

can it be tweaked for the new platform? or maybe there's a similar and workable solution.

Thanks in advance.

Vinin:

Answers here

Thank you Vinin. But unfortunately the article was not of any help. I tried adding FILE_SHARE_WRITE and FILE_SHARE_READ flags, nothing works.

Please help me to fix the script.


Files:
 
abdul1:

Thank you Vinin. But unfortunately the article didn't help. Added FILE_SHARE_WRITE and FILE_SHARE_READ flags, nothing helps.

Please help me to fix the script.



This is not enough. The structure of the history files has changed
 

Hi all!!!

Can you tell me why variables declared in a block (in curly brackets) are not visible outside the block

This is all in the updated MetaEditor5 build 914. How can I use variables declared in a block, if they are only visible inside the block?

if (Hour()==12)

{

double open = Open[0];

double close = Close[0];

}

double sum = open + close;

 
Have you tried declaring outside the block? Or is your guess insufficient? Sorry...
 
AlexeyVik:
Didn't you try announcing off the block? Or is your guess not good enough? Sorry...

Hey, you primate! How did you get in here? Or did you get internet in the jungle?

Go eat peanuts and don't scare evolution, or it'll get away with it.

 
neiutron:

Hey, you primate! How did you get in here? Or did you get internet in the jungle?

Go eat peanuts and don't scare evolution, or it will get away with it.


Incorrect behaviour on the correct answer. Warning
 
how to make the indicator recalculate only the value of zero bar or only the last two bars and not all of them on the history
   int i,// Индекс бара
   Counted_bars;
   Counted_bars=IndicatorCounted(); // Количество просчитанных баров 
   i=Bars-Counted_bars-1;           // Индекс первого непосчитанного
   if(i>History-1) // Если много баров то ..
      i=History-1;                  // ..рассчитывать заданное колич.
     
   while(i>=1) // Цикл по непосчитанным барам
     {
}
так я сделал чтобы пересчет делался по все кроме нулевого бара и нулевой не отображался а мне нада чтобы его было видно но не было пересчета по остальным барам до окончания текущего бара 
 

Help me to understand if the indicator redraws bars on history

//===================================================================================================================
  int IndAC(int Shift)
   {
   double AC_0,AC_1;
   int DirectionAC;
   AC_0 = iAC(Symbol(),0,Shift);
   AC_1 = iAC(Symbol(),0,Shift-1); смущает очень что указывается -1 бар а не +1
   if(AC_0>AC_1) {DirectionAC = 1;}               // Зелёный бар
   if(AC_0<AC_1) {DirectionAC = 2;}               // Красный бар
   return(DirectionAC);
   }
//===================================================================================================================     
int IndAO(int Shift)
   {
   double AO_0,AO_1;
   int DirectionAO;
   AO_0 = iAO(Symbol(),0,Shift);
   AO_1 = iAO(Symbol(),0,Shift-1);  смущает очень что указывается -1 бар а не +1 
   if(AO_0>AO_1) {DirectionAO = 1;}               // Зелёный бар
   if(AO_0<AO_1) {DirectionAO = 2;}               // Красный бар
   return(DirectionAO);
   }
//===================================================================================================================     
получается что если установить 1 бар то сравниватса будет с текущим нулевым
сутки прошли откликнитесь на просьбы нуба
Files:
 
There is a question about TimeLocal(), this functionreturns the local time of the computer on which the client terminal is running. At the same time TimeToStr converts a value containing time in seconds since 01.01.1970 .
For example:


void init() {
   Print("Time_Start = " + TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS) );
}

get:

2014.04.11 15:05:50.031 2001.01.03 07:25 : Time_Start = 2001.01.03 07:25:00
How to convert the time format obtained from
TimeLocal() to "2014.04.11 15:05:50"?

Reason: