órdenes abiertas con 10pip de diferencia - página 6

 
WHRoeder:
  1. Pedí el código que encuentra el precio abierto más alto. ¿Lo hace? ¿Lo hace en presencia de deslizamiento?
  2. ¿Qué crees que significa esto?
  3. Te pedí que mostraras el código que comprueba si Bid está 10 pips por encima de la última apertura.Por qué abres una venta cuando el mercado está 10 puntos por encima de cualquier orden (no la más alta).
  4. Decídete, quieres 10 puntos o 10 pips.





Si, quiero 10 pips .

 
dan100:

y también comprueba esta condición que he añadido si estoy en lo cierto..............

 double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price)
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
         RefreshRates();
          if (Bid>=highest_open_price+10*Point)
   highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);


     }

Por favor, no publique el código con un stray }

es confuso

Prueba tu EA en el probador de estrategias y verás si tienes razón o no


 
GumRai:

} -- WHRoeder lo señaló y lo he corregido gracias por anotarlo.



Creo que WHRoeder : tiene razón en su punto sobre el punto y pips, ahora alta se consigue creo pips debe ser considerado


 

ahora ver cómo he calculado mi pips desde alta se obtiene soy right..........


 double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price)
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
        

 int look_pips=0; 
for(pos=OrdersTotal()-1; pos>=0; pos--) 

      highest_open_price=MathAbs(High[pos]-Low[pos])/Point;  //pips levels of the bar
      if (Bid>=highest_open_price && look_pips >=my_pips)
      Print("The last price movement more than ",my_pips); 
 
         RefreshRates();
   highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);



recuerde mi_pips se añade en extern double my_pips =10; y también no han calculado para adaptarse a los corredores 5digit voy a añadir que este último.

	          
 

No tengo ni idea de lo que está tratando de hacer

Obtienes el valor dehighest_open_price en el primer bucle

Luego vuelves a recorrer los pedidos y le das un valor diferente

por qué?????

 
GumRai:

No tengo ni idea de lo que está tratando de hacer

Obtienes el valor dehighest_open_price en el primer bucle

Luego vuelves a recorrer los pedidos y le das un valor diferente

por qué?????




lo siento que un error que estaba a punto de volver a escribir antes de ver su puesto. sólo trabajó en él más para cambiarlo a valor de la garrapata ......

ahora uso el valor del tick para calcular los pips.....



 double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price)
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
        
        
   double tickvalue = (MarketInfo(Symbol(),MODE_TICKVALUE));
   if(Digits == 5 || Digits == 3){
      tickvalue = tickvalue*10;
   }
       if (Bid>=highest_open_price + tickvalue*10)
      Print("The last price movement more than ",tickvalue); 
 
         RefreshRates();
   highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);




now to add my comment on this tick value. one thing i know is -----10pips is a movement of price upward or down to definite number point stored while 10tick 
is count of moving price without storing number

else 10tick can complete in 1 candle far below pips. while 10pips can complete in more than 20bars/candle or even 1bar/candle.

conclusion i dont think i got it right?


please point me through 



in addition double MYPIP= MarketInfo(Symbol(), MODE_DIGITS); can  it work on this case to get pip
 
        
   double PipDecimal=Point;
   if(Digits == 5 || Digits == 3)
      PipDecimal = PipDecimal*10;

   if (Bid>=highest_open_price + PipDecimal *10)
 
GumRai:


Gracias por sus correcciones, se lo agradezco.


ahora he unido el código más alto se obtiene pips se obtiene...

luego lo probé pero el resultado no coincidió con el código ¿por qué? me estoy perdiendo algo ¿hay alguna condición

que tenga que añadir al código o es porque el mercado está cerrado... gracias

o se debe considerar doble PipDecimal = (MarketInfo(Symbol(),MODE_DIGITS)); .


 double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price)
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
        
   double PipDecimal=Point;
   if(Digits == 5 || Digits == 3)
      PipDecimal = PipDecimal*10;

   if (Bid>=highest_open_price + PipDecimal *10)
      Print("The last price movement more than ",PipDecimal); 
 
         RefreshRates();
   highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);





resultado
 
   if (Bid>=highest_open_price + PipDecimal *10)
      {
      Print("The last price movement more than ",PipDecimal); 
      RefreshRates();
      highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);
      }
Sin las llaves, se abrirá una nueva operación cada vez que se produzca un cambio.
 
GumRai:
Sin las llaves, un nuevo comercio se abrirá cada garrapata


es estupendo! ha funcionado bien... perfectamente localizado.


pero el único problema es que durante la segunda orden que continúe la apertura de múltiples órdenes de nuevo después de la primera orden exitosa abrió bien..

por favor hay algo que hice mal.