测试 "CopyTicks"。 - 页 13 1...67891011121314151617181920...47 新评论 fxsaber 2016.09.13 09:31 #121 prostotrader:你怎么知道这么多?除了Plaza II之外,还有FAST/FIX协议在1毫秒内完成上百个操作 蜱虫的历史表明,在RTS期货中不存在这样的东西。 Vasiliy Sokolov 2016.09.13 14:46 #122 fxsaber:这怎么可能呢?毕竟,即使是HFT也不能在不到1毫秒的时间内删除一个限价单。有一些特殊类型的市场订单,一次结合几个动作(不是MT5)。谁说行动的谨慎性必须由1ms的时间来设定?任何交易行为本质上都是交易所核心的记录,这是一个数据库。写入数据库的速度远远超过1毫秒。出于同样的原因,相匹配的出价形成了具有相同发生时间的长序列刻度,低至百万分之一秒。也就是说,这些交易实际上是同时发生的(写入数据库),尽管它们在图表上显示为一个长的最后序列。 fxsaber 2016.09.13 14:57 #123 Vasiliy Sokolov:有一些特殊类型的市场订单,一次结合几个动作(不是MT5)。谁说行动的谨慎性应该由1毫秒的时间来设定?任何交易行为本质上都是对交易所核心的写入,也就是一个数据库。 在一毫秒内有四次抽动,还没有发现。三--一次。二--几十万。写入数据库的速度远远超过1毫秒。出于同样的原因,相匹配的出价形成了具有相同发生时间的长序列刻度,低至百万分之一秒。也就是说,这些交易实际上是同时发生的(写入数据库),尽管它们在图表上显示为一个长的最后序列。 事情是这样的,不是翻牌,而是最好的牌子被监控(COPY_TICKS_INFO)。因此,1毫秒是合理的。如果有HFTs,他们在哪里?从剧本来看,他们是某种刹车。 fxsaber 2016.09.13 15:04 #124 脚本输出价格为零的COPY_TICKS_INFO#property script_show_inputs sinput int Count = 100000; // Количество тиков на проверку #define TOSTRING(A) " " + #A + " = " + (string)Tick.A string TickToString( const MqlTick &Tick ) { static int i = 0; i++; return("Tick" + (string)i + ":" + TOSTRING(time) + "." + (string)(Tick.time_msc %1000) + TOSTRING(bid) + TOSTRING(ask) + TOSTRING(last)+ TOSTRING(volume)); } void OnStart() { MqlTick Ticks[]; const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count); for (int i = 0; i < Amount; i++) if ((Ticks[i].bid == 0) || (Ticks[i].ask == 0)) Print(TickToString(Ticks[i])); }结果2016.09.13 18:02:06.297 Test (RTS-9.16,M1) Tick2: time = 2016.09.12 18:52:36.378 bid = 0.0 ask = 0.0 last = 98480.0 volume = 1 2016.09.13 18:02:06.297 Test (RTS-9.16,M1) Tick1: time = 2016.09.12 18:44:59.951 bid = 0.0 ask = 0.0 last = 98480.0 volume = 1CopyTicks错误? fxsaber 2016.09.14 10:03 #125 指标显示,CopyTicks可能不会给出最后的点位#property indicator_chart_window #property indicator_buffers 0 #property indicator_plots 0 #define TOSTRING(A) " " + #A + " = " + (string)Tick.A string TickToString( const MqlTick &Tick ) { static int i = 0; i++; return("Tick" + (string)i + ":" + TOSTRING(time) + "." + (string)(Tick.time_msc %1000) + TOSTRING(bid) + TOSTRING(ask) + TOSTRING(last)+ TOSTRING(volume)); } bool MySymbolInfoTick( const string Symb, MqlTick &Tick, const uint Type = COPY_TICKS_ALL ) { MqlTick Ticks[]; const int Amount = ::CopyTicks(Symb, Ticks, Type, 0, 1); const bool Res = (Amount > 0); if (Res) Tick = Ticks[Amount - 1]; return(Res); } int OnCalculate( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[] ) { MqlTick Tick1, Tick2; if (SymbolInfoTick(_Symbol, Tick2) && MySymbolInfoTick(_Symbol, Tick1)) if (Tick1.time_msc != Tick2.time_msc) Print(TickToString(Tick1) + "\n" + TickToString(Tick2) + "\n"); return(rates_total); }结果2016.09.14 12:55:23.047 Test2 (Si-9.16,M1) Tick250: time = 2016.09.14 12:55:04.521 bid = 64999.0 ask = 65002.0 last = 65002.0 volume = 2 2016.09.14 12:55:23.047 Test2 (Si-9.16,M1) Tick249: time = 2016.09.14 12:55:04.513 bid = 64999.0 ask = 65002.0 last = 65002.0 volume = 2 Slava 2016.09.14 10:27 #126 fxsaber: 脚本输出价格为零的COPY_TICKS_INFO结果CopyTicks错误? 输出标志也是 Rashid Umarov 2016.09.14 10:28 #127 Slawa: 也输出标志比如说string GetTickFlag(uint tickflag) { string flag=""; //--- if((tickflag&TICK_FLAG_BID)==TICK_FLAG_BID) flag=flag+"TICK_FLAG_BID"; if((tickflag&TICK_FLAG_ASK)==TICK_FLAG_ASK) flag=flag+" TICK_FLAG_ASK"; if((tickflag&TICK_FLAG_LAST)==TICK_FLAG_LAST) flag=flag+" TICK_FLAG_LAST"; if((tickflag&TICK_FLAG_VOLUME)==TICK_FLAG_VOLUME) flag=flag+" TICK_FLAG_VOLUME"; if((tickflag&TICK_FLAG_BUY)==TICK_FLAG_BUY) flag=flag+" TICK_FLAG_BUY"; if((tickflag&TICK_FLAG_SELL)==TICK_FLAG_SELL) flag=flag+" TICK_FLAG_SELL"; if(StringLen(flag)==0) return("FLAG_UNKNOWN"); return(flag); } //+------------------------------------------------------------------+ fxsaber 2016.09.14 10:41 #128 Slawa: 同时输出标志已更正#property script_show_inputs sinput int Count = 1000000; // Количество тиков на проверку #define TOSTRING(A) " " + #A + " = " + (string)Tick.A string TickToString( const MqlTick &Tick ) { static int i = 0; i++; return("Tick" + (string)i + ":" + TOSTRING(time) + "." + (string)(Tick.time_msc %1000) + TOSTRING(bid) + TOSTRING(ask) + TOSTRING(last)+ TOSTRING(volume) + TOSTRING(flags)); } void OnStart() { MqlTick Ticks[]; const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count); for (int i = 0; i < Amount; i++) if ((Ticks[i].bid == 0) || (Ticks[i].ask == 0)) Print(TickToString(Ticks[i])); }BCS-MetaTrader5的结果2016.09.14 13:37:03.896 Test (Si-9.16,M1) Tick23: time = 2016.09.13 18:52:35.505 bid = 0.0 ask = 0.0 last = 65253.0 volume = 35 flags = 6 2016.09.14 13:37:03.896 Test (Si-9.16,M1) Tick22: time = 2016.09.13 18:44:59.978 bid = 0.0 ask = 0.0 last = 65253.0 volume = 35 flags = 6 2016.09.14 13:37:03.895 Test (Si-9.16,M1) Tick21: time = 2016.09.13 00:02:36.809 bid = 0.0 ask = 0.0 last = 0.0 volume = 0 flags = 6 2016.09.14 13:37:03.895 Test (Si-9.16,M1) Tick20: time = 2016.09.13 00:02:36.809 bid = 0.0 ask = 0.0 last = 0.0 volume = 0 flags = 6 2016.09.14 13:37:03.895 Test (Si-9.16,M1) Tick19: time = 2016.09.12 18:52:35.635 bid = 0.0 ask = 0.0 last = 64721.0 volume = 2 flags = 6 2016.09.14 13:37:03.895 Test (Si-9.16,M1) Tick18: time = 2016.09.09 18:52:09.8 bid = 0.0 ask = 0.0 last = 64729.0 volume = 43 flags = 6 2016.09.14 13:37:03.895 Test (Si-9.16,M1) Tick17: time = 2016.09.09 18:44:59.923 bid = 0.0 ask = 0.0 last = 64729.0 volume = 43 flags = 6 2016.09.14 13:37:03.894 Test (Si-9.16,M1) Tick16: time = 2016.09.08 23:53:05.468 bid = 0.0 ask = 0.0 last = 64118.0 volume = 1 flags = 6 2016.09.14 13:37:03.894 Test (Si-9.16,M1) Tick15: time = 2016.09.08 18:51:59.107 bid = 0.0 ask = 0.0 last = 63870.0 volume = 99 flags = 6 2016.09.14 13:37:03.894 Test (Si-9.16,M1) Tick14: time = 2016.09.08 18:44:59.570 bid = 0.0 ask = 0.0 last = 63870.0 volume = 99 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick13: time = 2016.09.07 23:56:45.427 bid = 0.0 ask = 0.0 last = 64263.0 volume = 1 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick12: time = 2016.09.07 18:52:00.724 bid = 0.0 ask = 0.0 last = 64472.0 volume = 6 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick11: time = 2016.09.07 18:44:59.713 bid = 0.0 ask = 0.0 last = 64472.0 volume = 6 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick10: time = 2016.09.06 23:53:48.388 bid = 0.0 ask = 0.0 last = 64720.0 volume = 1 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick9: time = 2016.09.06 23:53:48.388 bid = 0.0 ask = 0.0 last = 64720.0 volume = 1 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick8: time = 2016.09.06 18:53:15.598 bid = 0.0 ask = 0.0 last = 64679.0 volume = 5 flags = 6 2016.09.14 13:37:03.893 Test (Si-9.16,M1) Tick7: time = 2016.09.06 18:44:59.960 bid = 0.0 ask = 0.0 last = 64679.0 volume = 5 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick6: time = 2016.09.05 23:59:06.607 bid = 0.0 ask = 0.0 last = 65225.0 volume = 3 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick5: time = 2016.09.05 23:59:06.607 bid = 0.0 ask = 0.0 last = 65225.0 volume = 3 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick4: time = 2016.09.05 23:59:03.529 bid = 0.0 ask = 0.0 last = 65225.0 volume = 3 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick3: time = 2016.09.05 23:54:00.315 bid = 0.0 ask = 0.0 last = 65225.0 volume = 3 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick2: time = 2016.09.05 18:51:40.877 bid = 0.0 ask = 0.0 last = 65178.0 volume = 2 flags = 6 2016.09.14 13:37:03.892 Test (Si-9.16,M1) Tick1: time = 2016.09.05 18:44:59.998 bid = 0.0 ask = 0.0 last = 65178.0 volume = 2 flags = 6 Rashid Umarov 2016.09.14 10:49 #129 fxsaber:BCS-MetaTrader5的结果 它是真实的还是演示的?我记得模拟账户 上也有类似的东西。 fxsaber 2016.09.14 10:52 #130 Rashid Umarov: 它是真实的还是演示的?我记得模拟账户 上也有类似的东西。真正的。不能重现吗? 1...67891011121314151617181920...47 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
你怎么知道这么多?
除了Plaza II之外,还有FAST/FIX协议
在1毫秒内完成上百个操作
这怎么可能呢?毕竟,即使是HFT也不能在不到1毫秒的时间内删除一个限价单。
结果
CopyTicks错误?
指标显示,CopyTicks可能不会给出最后的点位
结果
脚本输出价格为零的COPY_TICKS_INFO
结果
CopyTicks错误?
也输出标志
比如说
同时输出标志
已更正
BCS-MetaTrader5的结果
BCS-MetaTrader5的结果
它是真实的还是演示的?我记得模拟账户 上也有类似的东西。
真正的。不能重现吗?