O que é uma TICK? - página 2

 

OK, ótimo tópico !!!!

então O que é Volume? a contagem dos tempos de mudança de carrapato, ou a contagem dos tempos de trocas, ou a quantidade de fundo de trocas em um período ?

 

Para reafirmar:

Minha conclusão básica é que se houver uma mudança no MarketInfo() para o par, um "tick" é recebido.

.

Pode haver exceções, como "nenhuma mudança encontrada", mas um "tick" foi recebido, mas é muito raro.

Os tick recebidos sem alteração de preço não são raros, e sinalizam alguma outra alteração no MarketInfo para o par.

.

O volume é igual ao número de ticks recebidos, ou seja, o número de vezes que a função start() foi chamada, não é especificamente comercializada ou mudanças de Bid/Ask. A mudança em MarketInfo()aciona um tick, e tick count = volume.

 
phy:

.

O volume é igual ao número de carrapatos recebidos, ou seja, o número de vezes que a função start() foi chamada.


Sim, mas alguns carrapatos podem faltar (a função start() não foi chamada) porque o início anterior () ainda não foi concluído.

Na entrada de novas citações, a função start() dos especialistas anexos e indicadores personalizados será executada. Se a função start() foi lançada na cotação anterior quando uma nova cotação chegou, então a nova cotação será ignorada pelo especialista. Todas as novas citações enquanto o programa estava sendo executado são ignoradas pelo programa até que a execução atual da função start() tenha sido concluída. Depois disso, a função start() será executada somente quando uma nova cotação sucessiva for obtida. Para indicadores personalizados, a função start() será lançada ou recalculada depois que o símbolo do gráfico atual ou o período de tempo tiver sido mudado independentemente com as novas cotações recebidas. A função start() não será executada quando a janela de propriedades do especialista estiver aberta. Esta última não poderá ser aberta durante a execução do experto.

 

Não estou usando a função Start() para acionar, estou usando um script com um loop infinito para examinar MarketInfo().

Vou reescrever o script, já que o experimento tomou uma direção 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 recebidos com mudança de preço ou sem mudança de preço, tick count = volume.

Mas o cliente MT talvez não tenha recebido TODOS os tickets por algumas razões, como ruptura de rede temporária, alguns segundos.

então, tick count = volume é ele conta ou muda o tempo no servidor. ou definido pelo corretor quer mudar seu preço quantas vezes em um período.

Isso é correto?

Para que um corretor participe do mercado para proteger suas posições de clientes, Volume, também é definido pelo corretor que deseja alterar seu preço quantas vezes o muvh em um período.

Meu Deus!

Como utilizar os dados de volume ?

 

Perguntas sobre Marketinfo().

O excesso de chamadas Marketinfo() em um loop infinito será considerado spam pelo Corretor?

O que não seria considerado spam?

Com que freqüência você pode executar a Marketinfo() e não aborrecer o Corretor?

O Marketinfo() comanda a retirada do cache do Corretor, ou é uma verdadeira recompensa?

Obrigado

 

MarketInfo() chamadas não vão ao Dealer, ele lê os valores mais recentes já recebidos do dealer.

As ligações para o revendedor exigirão cerca de 100-300 milissegundos cada uma para serem concluídas.

// 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
 
GRANDE TÓPICO!!! PARA CIMA
 

Phy - desculpe por abrir este tópico novamente :-)

Estou pensando que existe uma má combinação entre o que você acredita sobre a natureza de um tick e seu método de cálculo de lucro/risco, etc. (a partir da leitura de alguns posts anteriores).

Isto é, você usa MarketInfo(Symbol(),MODE_TICKVALUE) por conta própria para determinar o valor do pip do par expresso em termos da moeda de depósito.

Entretanto, se o que você acredita sobre ticks no MT4 estiver correto, então o valor do tick pode mudar por um fator do número de pips entre ticks.

Em outras palavras, se o preço saltar subitamente um par de pips, uma chamada prévia ao MarketInfo poderia revelar que TICKSIZE e TICKVALUE são 0,0001 e 7,16 respectivamente. Então a próxima chamada poderia retornar 0,0002 e 14,32.

Neste caso, você sempre teria fator tanto MarketInfo(Symbol(),MODE_TICKSIZE) quanto MarketInfo(Symbol(),MODE_TICKVALUE) em suas fórmulas de lucro/risco e nunca MarketInfo(Symbol(),MODE_TICKVALUE) por conta própria.

Isto é preciso?


CB

 
MODE_TICKVALUE 16 Assinale o valor na moeda do depósito.
MODE_TICKSIZE 17 Marque o tamanho na moeda de cotação.

.

Para Euro na MBTrading:

10000 MODE_LOTSIZE Tamanho do lote na moeda base.
0,1 MODE_TICKVALUE Assinale o valor na moeda de depósito.
0,00001 MODE_TICKSIZE Tamanho do tick na moeda de cotação.

.

Substitua a palavra "tick" por "pip" acima, se você quiser.

.

Este corretor usa mini-lot como tamanho padrão -- MODE_LOTSIZE

Eles usam 3/5 dígitos para o preço -- MODE_TICKSIZE

O valor de um desses "ticks" é $0,10 -- MODE_TICKVALUE

.

Para GBPAUD:

.

10000 MODE_LOTSIZE Tamanho do lote na moeda base.
0,080262 MODE_TICKVALUE Assinalar o valor na moeda de depósito.
0,00001 MODE_TICKSIZE Tamanho do tick na moeda de cotação.

.

GBPAUD single pip move on one lot paga $0.080262

.

Sua idéia para calcular a mudança de preço de seu pedido de um momento para o outro...

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ão: