什么是TICK? - 页 2

 

好的,伟大的主题!!!!

那么什么是交易量呢?是指tick变化的次数,还是交易的次数,或者是一个时期内的交易资金量?

 

重述一下。

我的基本发现是,如果该货币对的MarketInfo()有变化,就会收到一个"√"。

.

可能会有例外,比如说 "没有发现变化",但却收到了一个"√",但这是非常罕见的。

在没有价格变化的情况下收到 "嘀嗒 "声并不罕见,它预示着该货币对的MarketInfo的一些其他变化。

.

成交量等于收到的点数,也就是start()函数被调用的次数,它不是具体的交易或Bid/Ask变化。MarketInfo()的变化会触发一个tick,tick数=成交量。

 
phy:

.

成交量等于收到的点数,也就是start()函数被调用的次数。


是的,但可能会错过一些时间(start()函数没有被调用),因为之前的start()仍未完成

在收到新的报价时,所附专家和自定义指标的start()函数将被执行。如果在新的报价到来时,前一个报价启动的start()函数正在运行,新的报价将被专家跳过。在程序执行时,所有新的报价收入都会被程序跳过,直到start()函数的当前执行完成。此后,只有在连续的新报价收入时,start()函数才会被运行。对于自定义指标,start()函数将在当前图表符号或时间框架被改变后,独立于新的报价传入时启动,进行重新计算。当专家属性窗口打开时,start()函数将不会被运行。后者不能在专家执行期间打开。

 

我不是用Start()函数来触发,我是用一个带有无尽循环的脚本来检查MarketInfo()。

我将重写这个脚本,因为实验出现了意想不到的方向。

.


//+------------------------------------------------------------------+
//| 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,Tick数=成交量。

但是客户的MT可能因为某些原因没有收到所有的Ticks,比如暂时断网,那么Tick数=成交量就是服务器上的计数或变化次数。

那么tick数=成交量是服务器上的计数或变化次数,还是由经纪人定义的在一个时期内改变其价格的次数。

是这样吗?

对于一个经纪人参与市场,以对冲它的客户交易头寸,体积,它也是由经纪人想改变其价格在一个时期内多少次定义。

我的天啊!

如何使用成交量数据?

 

关于Marketinfo()的问题。

在无休止的循环中过度调用Marketinfo()会被经纪商视为垃圾邮件 吗?

什么不会 被认为是垃圾邮件?

你可以多久执行一次Marketinfo()而不使经纪商不安?

Marketinfo()命令是从经纪商的缓存中提取的,还是一个真正的重新报价

谢谢

 

MarketInfo()的调用并不去找庄家,它读取的是已经从庄家那里收到的最新的数值。

对交易商的调用,每次需要大约100-300毫秒的时间来完成。

// 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
 
伟大的主题!!!。上升
 

菲--很抱歉再次打开这个话题 :-)

我在想,你所相信的"√"的性质与你计算利润/风险等的方法之间存在着错误的匹配。(通过阅读以前的一些帖子)。

也就是说,你单独使用MarketInfo(Symbol(),MODE_TICKVALUE)来确定以存款货币表示的货币对的点值。

然而,如果您对MT4中的点值的看法是正确的,那么点值可以通过点值之间的点数的系数来改变。

换句话说,如果价格突然跳了几个点,事先调用MarketInfo可能显示TICKSIZE和TICKVALUE分别为0.0001和7.16。然后下一次调用可能返回0.0002和14.32。

在这种情况下,你总是要将MarketInfo(Symbol(),MODE_TICKSIZE)和MarketInfo(Symbol(),MODE_TICKVALUE)这两个因素纳入你的利润/风险公式,而不是MarketInfo(Symbol(),MODE_TICKVALUE)本身。

这是否准确?


CB

 
MODE_TICKVALUE 16 以存款货币为单位的滴答值。
MODE_TICKSIZE 17 以报价货币计算的滴答大小。

.

对于MBTrading的欧元:

10000 MODE_LOTSIZE 基础货币的手数。
0.1 MODE_TICKVALUE 以入金货币计算的滴答值。
0.00001 MODE_TICKSIZE 以报价货币计算的滴答大小。

.

如果您愿意,请将上面的 "tick "替换为 "pip"。

.

该经纪人使用迷你手作为标准尺寸 -- MODE_LOTSIZE

他们使用3/5位的价格 -- MODE_TICKSIZE

其中一个 "点 "的价值是0.10美元 -- MODE_TICKVALUE

.

对于GBPAUD:

.

10000 MODE_LOTSIZE 以基础货币计算的手数。
0.080262 MODE_TICKVALUE 以存款货币计算的滴答值。
0.00001 MODE_TICKSIZE 以报价货币计算的票数大小。

.

GBPAUD在一手上的单点移动支付0.080262美元

.

你的想法是计算你的订单从一个时刻到下一个时刻的价格变化......

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.