Errors, bugs, questions - page 1217

 
fyords:

There is a simple script (MT4) that outputs the closing time of an order before and after it is closed.

Result at customer(711 build):

I have the result (711-719 build):

UPD: this only happens when I give the compiled product. If I pass the source, no such problems, everything works like clockwork.
Thanks for the message, fixed, please wait for new build (planned for tomorrow).
Use the following construction for OrderCloseTime,OrderOpenTime and OrderExpiration functions to work in the current build:
int time=(int)OrderCloseTime();
TimeToString(time);
 
mql5:
Thanks for the message, fixed, please wait for the new build (planned for tomorrow).
Use the following construction for OrderCloseTime,OrderOpenTime and OrderExpiration functions to work in the current build:
Thank you for your responsiveness.
 
Are there any plans to modify theWebRequest function to work with Russian text?
 

it doesn't work like this, there are objects on the graph:

   double Pos_Buy=(-1);
   if(ObjectFind("UP_Line")==0)
   {
      Pos_Buy=ObjectGetValueByShift("UP_Line",0);
   }
   double Pos_Sell=(-1);
   if(ObjectFind("DN_Line")==0)
   {
      Pos_Sell=ObjectGetValueByShift("DN_Line",0);
   }
   double Pos_Buy_CH=(-1);
   if(ObjectFind("UP_Line1")==0)
   {
      Pos_Buy_CH=ObjectGetValueByShift("UP_Line1",0);
   }
   double Pos_Sell_CH=(-1);
   if(ObjectFind("DN_Line1")==0)
   {
      Pos_Sell_CH=ObjectGetValueByShift("DN_Line1",0);
   }
   Print(Pos_Buy," ",Pos_Sell," ",Pos_Buy_CH," ",Pos_Sell_CH);
   if(Pos_Buy==(-1)&&Pos_Sell==(-1)&&Pos_Buy_CH==(-1)&&Pos_Sell_CH==(-1))return;
   Print(2);


2014.10.09 20:10:37.906 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1
2014.10.09 20:10:37.906 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1
2014.10.09 20:10:37.890 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1
2014.10.09 20:10:37.890 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1
2014.10.09 20:10:37.875 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1
2014.10.09 20:10:37.875 2014.10.02 14:52  cat_in_the_bagLast2 EURUSD,H4: -1 -1 -1 -1 1


 
no errors during compilation, ObjectFind() does not see the object
 

Yeah, that shit doesn't pass true:

   if(ObjectFind("UP_Line")==0)
   {
      Print(3);
      //Pos_Buy=ObjectGetValueByShift("UP_Line",0);
   }

вот это возвращает -1 при наличии объекта на графике

   Print(ObjectFind("UP_Line"));
 
 

OH HORROR, and so returns -1:

   Print(ObjectFind(0,"UP_Line"));
   if(ObjectFind(0,"UP_Line")==0)
   {
      Print(3);
      //Pos_Buy=ObjectGetValueByShift("UP_Line",0);
   }

HOW TO LIVE?

the objects on the tester's graph are there.

 

someone check the code on the 719 build.

Does it work?

 
sanyooooook:

someone check the code on the 719 build.

Does it work?

I'll have a look now...

P.S. Checked in 719 build with script. It works.

//+------------------------------------------------------------------+
//|                                                        #Test.mq4 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "http://www.mql4.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   int res=ObjectFind("Hello");
   if(res<0)
      Print("Объект Hello не найден!");
   else
      Print("Объект Hello найден в окне: ",res);
  }
//+------------------------------------------------------------------+
0       19:51:10.567    Script #Test  EURGBP,M15: loaded successfully
0       19:51:10.568    #Test  EURGBP,M15: initialized
0       19:51:10.568    #Test  EURGBP,M15: Объект Hello найден в окне: 0
0       19:51:10.568    #Test  EURGBP,M15: uninit reason 0
0       19:51:10.568    Script #Test  EURGBP,M15: removed
 

here's the deal:

1. I open a new chart

2. create an object

3. Copy the object name (already created by the Expert Advisor) from another chart

4. change the object name by copying it to the new chart

5. launch the script

void OnStart()
  {
//---
   Print(ObjectFind(0,"UP_Line"));
   if(ObjectFind(0,"UP_Line")==0)
   {
      Print(3);
      //Pos_Buy=ObjectGetValueByShift("UP_Line",0);
   }   
  }

6. obtain the result:

2014.10.09 20:46:21.828 TestObjectFind EURUSD,H1: uninit reason 0
2014.10.09 20:46:21.828 TestObjectFind EURUSD,H1: -1
2014.10.09 20:46:21.828 TestObjectFind EURUSD,H1: initialized
Reason: