¿Qué es un TICK? - página 2

 

¡¡¡¡OK, Gran tema !!!!

Entonces, ¿qué es el volumen? ¿el recuento de veces de cambio de ticks, o el recuento de veces de operaciones, o la cantidad de fondo de operaciones en un período?

 

Para reafirmar:

Mi conclusión básica es que si hay un cambio en MarketInfo() para el par, se recibe un "tick".

.

Puede haber excepciones, como "no se encontraron cambios" pero se recibió un tick, pero es muy raro.

Los ticks recibidos sin cambio de precio no son raros, y señalan algún otro cambio en MarketInfo para el par.

.

El volumen es igual al número de ticks recibidos, es decir, el número de veces que se llamó a la función start(), no es específicamente operaciones o cambios Bid/Ask. El cambio en MarketInfo()desencadena un tic, y el número de tics = volumen.

 
phy:

.

El volumen es igual al número de ticks recibidos, es decir, el número de veces que se llamó a la función start().


Sí, pero algunos ticks pueden perderse (la función start() no fue llamada) porque el start() anterior aún no se ha completado.

A la entrada de nuevas cotizaciones, se ejecutará la función start() de los expertos e indicadores personalizados adjuntos. Si la función start() lanzada en la cotización anterior se estaba ejecutando cuando llegó una nueva cotización, la nueva cotización será omitida por el experto. Todas las nuevas cotizaciones que ingresen mientras se ejecuta el programa son omitidas por el programa hasta que la ejecución actual de la función start() haya finalizado. Después de eso, la función start() será ejecutada sólo cuando una nueva cotización sucesiva ingrese. En el caso de los indicadores personalizados, la función start() se lanzará para el recálculo después de que el símbolo del gráfico actual o el marco temporal hayan sido cambiados independientemente de la entrada de nuevas cotizaciones. La función start() no se ejecutará cuando la ventana de propiedades del experto esté abierta. Esta última no puede abrirse durante la ejecución del experto.

 

No estoy usando la función Start() para disparar, estoy usando un script con un bucle sin fin para examinar MarketInfo().

Voy a reescribir el script, ya que el experimento ha tomado una dirección inesperada.

.


//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+


    double oldBid, oldAsk, oldVolume, oldCheckSum, oldTickValue, oldSpread, oldMarginRequired;
    int oldTime;
    int tickValueChange;
    int checkSumCount = -2;
    double checkSum;

int start()
  {

   oldBid = Bid;
   oldAsk = Ask;
   oldVolume = Volume[0];
   oldTime = Time[0];
   oldCheckSum         = GetCheckSum();
   oldTickValue         = MarketInfo(Symbol(), MODE_TICKVALUE);
   oldSpread             = MarketInfo(Symbol(),MODE_SPREAD);  
   oldMarginRequired     = MarketInfo(Symbol(),MODE_MARGINREQUIRED);
   
   int bidChange, askChange, eitherChange, neitherChange, bothChange, tickCount, spreadChange, marginChange;

    while(!IsStopped()){

       RefreshRates();
       if(oldVolume != Volume[0]) tickCount += 1;
       if(oldBid != Bid && oldAsk == Ask) bidChange += 1;
       if(oldAsk != Ask && oldBid == Bid) askChange += 1;   
       if(oldBid != Bid && oldAsk != Ask) bothChange += 1;
       if(oldBid == Bid && oldAsk == Ask && oldVolume != Volume[0]){
           if     (oldTickValue != MarketInfo(Symbol(), MODE_TICKVALUE)) tickValueChange +=1;
           else if(oldSpread != MarketInfo(Symbol(),MODE_SPREAD)) spreadChange += 1;
           else if(oldMarginRequired != MarketInfo(Symbol(),MODE_MARGINREQUIRED)) marginChange += 1;
           else neitherChange += 1;
       }
       
       GetCheckSum();
       
       Comment("\n"+
                   " Bid Change              = " + bidChange + "\n" +
                   " Ask Change             = " + askChange + "\n" +
                   " Both Change            = " + bothChange + "\n" +
                   " MarketInfo Change  = " + checkSumCount + "\n" +
                      " TickValueChange     = " + tickValueChange + "\n" +
                      " Margin Change        = " + marginChange + "\n" +
                      " Spread Change        = " + spreadChange + "\n" +
                   " No Change              = " + neitherChange + "\n" +
                   //" Checksum           = " + checkSum + "\n" +
                   " Sum of above          = " + (bidChange + askChange + bothChange + spreadChange + neitherChange + checkSumCount +tickValueChange) + "\n" +
                   " Tick Volume            = " + tickCount);
                   
       Sleep(16);
                   
        oldVolume = Volume[0];
        oldBid = Bid;
        oldAsk = Ask;
        
    
    }


   return(0);
  }

double    GetCheckSum(){


    checkSum =
         
   (100*MarketInfo(Symbol(),MODE_LOW)) +
   (101*MarketInfo(Symbol(),MODE_HIGH)) +
   //(102*MarketInfo(Symbol(),MODE_TIME)) +
   //(103*MarketInfo(Symbol(),MODE_BID)) +
   //(104*MarketInfo(Symbol(),MODE_ASK)) +
   (105*MarketInfo(Symbol(),MODE_POINT)) +
   (106*MarketInfo(Symbol(),MODE_DIGITS)) +
   //(107*MarketInfo(Symbol(),MODE_SPREAD)) +
   (108*MarketInfo(Symbol(),MODE_STOPLEVEL)) +
   (109*MarketInfo(Symbol(),MODE_LOTSIZE)) +
   //(110*MarketInfo(Symbol(),MODE_TICKVALUE)) +
   (111*MarketInfo(Symbol(),MODE_TICKSIZE)) +
   (112*MarketInfo(Symbol(),MODE_SWAPLONG)) +
   (113*MarketInfo(Symbol(),MODE_SWAPSHORT)) +
   (114*MarketInfo(Symbol(),MODE_STARTING)) +
   (115*MarketInfo(Symbol(),MODE_EXPIRATION)) +
   (116*MarketInfo(Symbol(),MODE_TRADEALLOWED)) +
   (117*MarketInfo(Symbol(),MODE_MINLOT)) +
   (118*MarketInfo(Symbol(),MODE_LOTSTEP)) +
   (119*MarketInfo(Symbol(),MODE_MAXLOT)) +
   (120*MarketInfo(Symbol(),MODE_SWAPTYPE)) +
   (121*MarketInfo(Symbol(),MODE_PROFITCALCMODE)) +
   (122*MarketInfo(Symbol(),MODE_MARGINCALCMODE)) +
   (123*MarketInfo(Symbol(),MODE_MARGININIT)) +
   (124*MarketInfo(Symbol(),MODE_MARGINMAINTENANCE)) +
   (125*MarketInfo(Symbol(),MODE_MARGINHEDGED)) +
   //(126*MarketInfo(Symbol(),MODE_MARGINREQUIRED)) +
   (127*MarketInfo(Symbol(),MODE_FREEZELEVEL));

    if(checkSum != oldCheckSum) checkSumCount += 1;
    
    oldCheckSum = checkSum;
    
    return(checkSumCount);
}
 

Ticks recibidos con cambio de precio o sin cambio de precio, conteo de ticks = volumen.

Pero el cliente MT tal vez no reciba TODOS los Ticks para algunos reaseons como la ruptura de la red temporalmente algunos seconeds.

entonces el conteo de ticks = volumen es el conteo o el cambio de veces en el servidor. o definido por el broker quiere cambiar su precio cuantas veces en un periodo.

¿Es eso cierto?

Para que un broker tome parte en el mercado para cubrir las posiciones de sus clientes, el volumen, también está definido por el broker que quiere cambiar su precio cuántas veces en un período.

Dios mío.

¿Cómo utilizar los datos de volumen?

 

Preguntas sobre Marketinfo().

¿El corredor considerará el exceso de llamadas a Marketinfo() en un bucle sin fin como spam?

¿Qué es lo que no se considera spam?

¿Con qué frecuencia se puede ejecutar Marketinfo() y no molestar al Broker?

¿El comando Marketinfo() tira de la caché del Broker, o es una recotización real?

Gracias

 

Las llamadas aMarketInfo() no van al Distribuidor, lee los valores más recientes ya recibidos del distribuidor.

Las llamadas al Distribuidor requerirán unos 100-300 milisegundos cada una para completarse.

// script
int start(){
  
   int startTime = GetTickCount();  
   for(int i = 0; i < 10000; i++){   
      int spread = MarketInfo(Symbol(), MODE_SPREAD);  
   }   
   int endTime = GetTickCount();   
   Print("Time to collect 10000 instances of data = " + (endTime -startTime) + " milliseconds");  
   
   startTime = GetTickCount();  
   OrderSend(Symbol(), OP_BUY, 1, Ask, 0, 0, 0 , "", 0, 0, CLR_NONE);
   endTime = GetTickCount();   
   Print("Time to send one order to Server = " + (endTime -startTime) + " milliseconds");  
   return(0);
}
 
2008.10.27 16:32:37 Test GBPJPY,M15: Time to send one order to Server = 531 milliseconds
2008.10.27 16:32:37 Test GBPJPY,M15: open #8556064 buy 1.00 GBPJPY at 144.77 ok
2008.10.27 16:32:37 Test GBPJPY,M15: Time to collect 10000 instances of data = 438 milliseconds
 
¡¡¡GRAN TEMA!!! UP
 

Phy - perdón por abrir este tema de nuevo :-)

Estoy pensando que hay un desajuste entre lo que crees sobre la naturaleza de un tick y tu método de cálculo de beneficio/riesgo, etc. (por la lectura de algunos post anteriores).

Es decir, que utilizas MarketInfo(Symbol(),MODE_TICKVALUE) por sí solo para determinar el valor del pip del par expresado en términos de la moneda de depósito.

Sin embargo, si lo que cree sobre los ticks en MT4 es correcto, entonces el valor del tick puede cambiar por un factor del número de pips entre ticks.

En otras palabras, si el precio salta de repente un par de pips, una llamada previa a MarketInfo podría revelar que TICKSIZE y TICKVALUE son 0,0001 y 7,16 respectivamente. Entonces la siguiente llamada podría devolver 0,0002 y 14,32.

En este caso, siempre habría que tener en cuenta tanto MarketInfo(Symbol(),MODE_TICKSIZE) como MarketInfo(Symbol(),MODE_TICKVALUE) en sus fórmulas de beneficio/riesgo y nunca MarketInfo(Symbol(),MODE_TICKVALUE) por sí solo.

¿Es esto correcto?


CB

 
MODE_TICKVALUE 16 Valor del tick en la moneda del depósito.
MODE_TICKSIZE 17 Tamaño del tick en la moneda de cotización.

.

Para el euro en MBTrading:

10000 MODE_LOTSIZE Tamaño del lote en la moneda base.
0.1 MODE_TICKVALUE Valor del tick en la moneda del depósito.
0.00001 MODE_TICKSIZE Tamaño del tick en la moneda de cotización.

.

Sustituya la palabra "tick" por "pip" arriba, si lo desea.

.

Este broker utiliza el mini lote como tamaño estándar -- MODE_LOTSIZE

Utilizan 3/5 dígitos para el precio -- MODE_TICKSIZE

El valor de uno de esos "ticks" es de $0.10 -- MODE_TICKVALUE

.

Para GBPAUD:

.

10000 MODE_LOTSIZE Tamaño del lote en la moneda base.
0.080262 MODE_TICKVALUE Valor del tick en la moneda del depósito.
0.00001 MODE_TICKSIZE Tamaño del tick en la moneda de cotización.

.

El movimiento de un solo pip en un lote de GBPAUD paga $0.080262

.

Su idea para calcular el cambio de precio de su orden de un momento a otro...

PositionValueChange = PriceChangeInPips * MarketInfo( OrderSymbol(), MODE_TICKVALUE) * OrderLots();

.

MB Trading Futures, Inc.
MBTrading- Demo Server

MB Trading Futures, Inc.
MBT MetaTrader 4
D:\Program Files ( x86)\MetaTrader\MBT MetaTrader 4
/ reports/ MarketInfo_MB Trading Futures, Inc._. txt
2009.07.15 16:47:49



Report for EURUSD

1.39775     MODE_LOW                Low day price. 
1.41344     MODE_HIGH               High day price. 
2009.07.15 16:47:48     MODE_TIME               The last incoming tick time ( last known server time). 
1.41044     MODE_BID                Last incoming bid price. For the current symbol, it is stored in the predefined variable Bid 
1.41054     MODE_ASK                Last incoming ask price. For the current symbol, it is stored in the predefined variable Ask 
0.00001     MODE_POINT              Point size in the quote currency. For the current symbol, it is stored in the predefined variable Point 
5     MODE_DIGITS             Count of digits after decimal point in the symbol prices. For the current symbol, it is stored in the predefined variable Digits 
10     MODE_SPREAD             Spread value in points. 
0     MODE_STOPLEVEL          Stop level in points. 
10000     MODE_LOTSIZE            Lot size in the base currency. 
0.1     MODE_TICKVALUE          Tick value in the deposit currency. 
0.00001     MODE_TICKSIZE           Tick size in the quote currency. 
-0.6     MODE_SWAPLONG           Swap of the long position. 
-2.4     MODE_SWAPSHORT          Swap of the short position. 
0     MODE_STARTING           Market starting date ( usually used for futures). 
0     MODE_EXPIRATION         Market expiration date ( usually used for futures).
1     MODE_TRADEALLOWED       Trade is allowed for the symbol. 
0.1     MODE_MINLOT             Minimum permitted amount of a lot. 
0.1     MODE_LOTSTEP            Step for changing lots. 
10000     MODE_MAXLOT             Maximum permitted amount of a lot. 
2     MODE_SWAPTYPE           Swap calculation method. 0 - in points; 1 - in the symbol base currency; 2 - by interest; 3 - in the margin currency.
0     MODE_PROFITCALCMODE     Profit calculation mode. 0 - Forex; 1 - CFD; 2 - Futures. 
0     MODE_MARGINCALCMODE     Margin calculation mode. 0 - Forex; 1 - CFD; 2 - Futures; 3 - CFD for indices.
0     MODE_MARGININIT         Initial margin requirements for 1 lot. 
0     MODE_MARGINMAINTENANCE  Margin to maintain open positions calculated for 1 lot.
0     MODE_MARGINHEDGED       Hedged margin calculated for 1 lot. 
141.05     MODE_MARGINREQUIRED     Free margin required to open 1 lot for buying. 
0     MODE_FREEZELEVEL        Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed. 

Report for GBPAUD
2.04     MODE_LOW                Low day price. 
2.06095     MODE_HIGH               High day price. 
2009.07.15 16:47:42     MODE_TIME               The last incoming tick time (last known server time). 
2.04538     MODE_BID                Last incoming bid price. For the current symbol, it is stored in the predefined variable Bid 
2.04588     MODE_ASK                Last incoming ask price. For the current symbol, it is stored in the predefined variable Ask 
0.00001     MODE_POINT              Point size in the quote currency. For the current symbol, it is stored in the predefined variable Point 
5     MODE_DIGITS             Count of digits after decimal point in the symbol prices. For the current symbol, it is stored in the predefined variable Digits 
50     MODE_SPREAD             Spread value in points. 
0     MODE_STOPLEVEL          Stop level in points. 
10000     MODE_LOTSIZE            Lot size in the base currency. 
0.080262     MODE_TICKVALUE          Tick value in the deposit currency. 
0.00001     MODE_TICKSIZE           Tick size in the quote currency. 
-1.47     MODE_SWAPLONG           Swap of the long position. 
-3.65     MODE_SWAPSHORT          Swap of the short position. 
0     MODE_STARTING           Market starting date (usually used for futures). 
0     MODE_EXPIRATION         Market expiration date (usually used for futures).
1     MODE_TRADEALLOWED       Trade is allowed for the symbol. 
0.1     MODE_MINLOT             Minimum permitted amount of a lot. 
0.1     MODE_LOTSTEP            Step for changing lots. 
10000     MODE_MAXLOT             Maximum permitted amount of a lot. 
2     MODE_SWAPTYPE           Swap calculation method. 0 - in points; 1 - in the symbol base currency; 2 - by interest; 3 - in the margin currency.
0     MODE_PROFITCALCMODE     Profit calculation mode. 0 - Forex; 1 - CFD; 2 - Futures. 
0     MODE_MARGINCALCMODE     Margin calculation mode. 0 - Forex; 1 - CFD; 2 - Futures; 3 - CFD for indices.
0     MODE_MARGININIT         Initial margin requirements for 1 lot. 
0     MODE_MARGINMAINTENANCE  Margin to maintain open positions calculated for 1 lot.
0     MODE_MARGINHEDGED       Hedged margin calculated for 1 lot. 
164.21     MODE_MARGINREQUIRED     Free margin required to open 1 lot for buying. 
0     MODE_FREEZELEVEL        Order freeze level in points. If the execution price lies within the range defined by the freeze level, the order cannot be modified, cancelled or closed.  
Razón de la queja: