Errores, fallos, preguntas - página 1217

 
fyords:

Existe un sencillo script (MT4) que emite la hora de cierre de una orden antes y después de su cierre.

Resultado en el cliente(711 build):

Tengo el resultado (711-719 build):

UPD: esto sólo ocurre cuando doy el producto compilado. Si paso la fuente, no hay esos problemas, todo funciona como un reloj.
Gracias por el mensaje, arreglado, por favor espere a la nueva construcción (prevista para mañana).
Utilice la siguiente construcción para que las funciones OrderCloseTime, OrderOpenTime y OrderExpiration funcionen en la versión actual:
int time=(int)OrderCloseTime();
TimeToString(time);
 
mql5:
Gracias por el mensaje, arreglado, por favor espere a la nueva construcción (prevista para mañana).
Utilice la siguiente construcción para que las funciones OrderCloseTime, OrderOpenTime y OrderExpiration funcionen en la versión actual:
Gracias por su capacidad de respuesta.
 
¿Está previsto modificar la funciónWebRequest para que funcione con texto ruso?
 

no funciona así, hay objetos en el gráfico:

   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 hay errores durante la compilación, ObjectFind( ) no ve el objeto
 

Sí, esa mierda no pasa de verdad:

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

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

   Print(ObjectFind("UP_Line"));
 
 

OH HORROR, y así devuelve -1:

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

¿CÓMO VIVIR?

los objetos de la gráfica del probador están ahí.

 

que alguien compruebe el código de la compilación 719.

¿Funciona?

 
sanyooooook:

que alguien compruebe el código de la compilación 719.

¿Funciona?

Déjame ver...

P.D. Comprobado en la build 719 con el script. Funciona.

//+------------------------------------------------------------------+
//|                                                        #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
 

este es el trato:

1. Abro un nuevo gráfico

2. crear un objeto

3. Copiar el nombre del objeto (ya creado por el Asesor Experto) de otro gráfico

4. cambiar el nombre del objeto copiándolo en el nuevo gráfico

5. lanzar el script

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

6. obtener el resultado:

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