[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 623

 

Displayed the time display for iTime periods D1 and H1 (I am dealing with the incorrect operation of the indicator in this way)

it turned out that it did not coincide with the time of the tester, where I do the main runs.

In the tester it was October 2010. And when I rewind quotes, the time was 00:00 for D1

and 13:00 for H1 remained unchanged. Why do the iTime time and the tester time (in the picture) not coincide?

 
Fox_RM:

Displayed the time display for iTime periods D1 and H1 (I am dealing with the incorrect operation of the indicator in this way)

it turned out that it did not coincide with the time of the tester, where I do the main runs.

In the tester it was October 2010. And when I rewind quotes, the time was 00:00 for D1

and 13:00 for H1 remained unchanged. Why do the iTime time and the tester time (in the picture) not coincide?

the code that counts/puts the time in addition to the picture
 
iTime(NULL,PERIOD_D1,i), iTime(NULL,PERIOD_H1,i), i - standard looping. I do the run on the history in the tester, and the server time function, as I understand it displays!
 
Fox_RM:
iTime(NULL,PERIOD_D1,i), iTime(NULL,PERIOD_H1,i), i - standard looping. I do the run on the history in the tester, and the server time function, as I understand it displays!

If you don't want to get help, don't ask riddles. No one wants to solve puzzles (especially ones that no one wants).
 

I think I've made my question clear...

Here's a crude code sketch:

int start()
  {
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) return(-1);
   if(counted_bars>0) counted_bars--;
    
   int  limit = Bars - counted_bars;
     
     for (int i=limit; i>=0; i--)
     {
       
    tm1=iTime(NULL,PERIOD_D1,i);           //--- Определяю время (Выводит текущую дату. Не совпадает с временем в тестере.)
    int shift=iBarShift(NULL,PERIOD_H4,tm1,false);  //---По этому времени ищем бар
   
    hgh = iHigh(NULL,PERIOD_H4,shift);   //---High бара
    lwo = iLow(NULL,PERIOD_H4,shift);    //---Low бара
          
     flatline("Lev_Up",tm1,hgh,tm2,lwo,Green,1);
     flatline("Lev_Dn",tm1,hgh,tm2,lwo,Green,1);
     }
     
     SetText("Tm1","Tm2",TimeToStr(tm1),TimeToStr(tm1),Red,Blue,12);
     SetText2("Shift",shift,Red,12);
     SetText5("High","Low", hgh,lwo,Red,Blue,12);
           
     //----
   return(0);
  }

The problem with the difference between the time output by iTime(NULL,PERIOD_D1 ,i) function and the time displayed in the tester. I do not understand why.

The essence of the code, draw a line on a chart for high and low bar of the period H4. This bar should correspond to 00:00.

Files:
 

Hello, I have MT4 of one brokerage company and MT4 of another one. i transferred servers (.srv) in the folder \Program Files\MetaTrader 4\config no problem, but with MT4 and MT4Multiterminal (different brokerage companies too) does not work......

I changed my IP in .srv/I tried many DTs/I tried renaming it NOT................ACK. INACTIVE AND NO GRAPH

how to do it??????
 

Hello. I have a simple script to open an order in a 4-digit DC. Please give me a hint how the same script should look like but it should work in a 5-digit one.

int start()

{
OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Ask-200*Point,Ask+200*Point);

return(0);
}

 

There is a file in the "experts" folder that needs to be copied each time the Custom Indicator is started.

- Is it possible to copy files from the code and if so, how?

Thank you!

 
MarcusCrassus:

Hello. I have a simple script to open an order in a 4-digit DC. Please give me a hint how the same script should look like but it should work in a 5-digit one.

int start()

{
OrderSend(Symbol(),OP_BUY,0.01,Ask,3,Ask-200*Point,Ask+200*Point);

return(0);
}


int start()

{
OrderSend(Symbol(),OP_BUY,0.01,Ask,3*10,Ask-200*Point*10,Ask+200*Point*10);

return(0);
}
 
zxc thank you, it's not a world without good people.