フォルツァ執行上の問題点 - ページ 108

 

証券取引所の時間との同期の問題は、非常に簡単に解決することができます。

struct MqlBookInfo 
  { 
   ENUM_BOOK_TYPE   type;       // тип заявки из перечисления ENUM_BOOK_TYPE 
   double           price;      // цена 
   long             volume;     // объем 
  };

プラザ2仕様から

MqlBookInfo構造体に時間を追加するだけです :)

struct MqlBookInfo 
  { 
   ENUM_BOOK_TYPE   type;       // тип заявки из перечисления ENUM_BOOK_TYPE 
   double           price;      // цена 
   long             volume;     // объем 
   ulong            moment;     // время (добавить)    
  };
 
fxsaber:

上のスクリプトとは関係ないんだけどね。問題が発生した取引口座での出力を見せてください。

間違ったスクリプトでした :)

2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508923,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508924,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508925,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508926,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508927,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508928,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_DONE_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_SETUP_MSC)) = 2018.04.25 16:49:23.000
 
Dennis Kirichenko:

面白い!

 
prostotrader:

証券取引所の時間との同期の問題は、非常に簡単に解決することができます。

プラザ2仕様から

つまり、MqlBookInfoの構造体に時間を追加するだけです :)

しかし、ログを読む際の問題、つまり、私がある時間を持っていて、Exchange/Serverが別の時間を持っている場合、どのように解決するのでしょうか?

いずれにせよ、私たちには利用できない。

 
Aleksey Vyazmikin:
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508923,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508924,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508925,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508926,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508927,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryDealGetInteger(48508928,DEAL_TIME_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_DONE_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_SETUP_MSC)) = 2018.04.25 16:49:23.000

サーバーのログと時間が一致しないので、より無意味になっている。

トレーディング、自動売買システム、トレーディング戦略のテストに関するフォーラム

フォルツァ実行に関する質問

アレクセイ・ヴャズミキン さん 2018.04.26 12:56

クライアント側でネットワーク遅延が 発生したようです。トレードサーバー側での実行状況は以下の通りです。

0       6       2018.04.25 16:49:24.024 85.***.***.***    '***': exchange buy 10.00 Si-6.18 at market (62785 / 62788 / 62787)
0       6       2018.04.25 16:49:24.024 85.***.***.***    '***': request transfered to dealers, rule 'FORTS Gateway #real' (exchange buy 10.00 Si-6.18 at market)
0       6       2018.04.25 16:49:24.028 127.0.0.1       '2': request from '***' (exchange buy 10.00 Si-6.18 at market)
0       6       2018.04.25 16:49:24.029 127.0.0.1       '2': placed for execution for '***' (exchange buy 10.00 Si-6.18 at market)(62785 / 62788 / 62787) 
0       6       2018.04.25 16:49:24.029 85.***.***.***    '***': order placed for execution [#87849076 buy 10.00 Si-6.18 at market], time 5.98 ms
0       6       2018.04.25 16:49:24.030 FORTS Gateway #real     '***': order #87849076 buy 10.00 Si-6.18 at market request new due execution [request new order #87849076], time: 0.05 ms
0       6       2018.04.25 16:49:24.036 FORTS Gateway #real     '***': order #87849076 buy 10.00 Si-6.18 at market placed due execution [added order #87849076, buy limit 10.00 Si-6.18 at 65426 [based on order '30444116819']], time: 0.18 ms
0       6       2018.04.25 16:49:24.041 FORTS Gateway #real     '***': deal performed [#48508923 buy 1.00 Si-6.18 at 62788]
0       6       2018.04.25 16:49:24.041 '***': order performed partially buy 1.00 at 62788 [#87849076 buy 10.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.041 FORTS Gateway #real     '***': order #87849076 buy 10.00 Si-6.18 at market filled due execution [filled order #87849076, buy 1.00 Si-6.18 at 62788 [based on deal '2026006054']], time: 2.06 ms
0       6       2018.04.25 16:49:24.043 FORTS Gateway #real     '***': deal performed [#48508924 buy 1.00 Si-6.18 at 62788]
0       6       2018.04.25 16:49:24.043 '***': order performed partially buy 1.00 at 62788 [#87849076 buy 10.00 / 1.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.043 FORTS Gateway #real     '***': order #87849076 buy 10.00 / 1.00 Si-6.18 at market filled due execution [filled order #87849076, buy 1.00 Si-6.18 at 62788 [based on deal '2026006055']], time: 3.02 ms
0       6       2018.04.25 16:49:24.048 FORTS Gateway #real     '***': deal performed [#48508925 buy 5.00 Si-6.18 at 62788]
0       6       2018.04.25 16:49:24.048 '***': order performed partially buy 5.00 at 62788 [#87849076 buy 10.00 / 2.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.048 FORTS Gateway #real     '***': order #87849076 buy 10.00 / 2.00 Si-6.18 at market filled due execution [filled order #87849076, buy 5.00 Si-6.18 at 62788 [based on deal '2026006056']], time: 1.73 ms
0       6       2018.04.25 16:49:24.050 FORTS Gateway #real     '***': deal performed [#48508926 buy 1.00 Si-6.18 at 62789]
0       6       2018.04.25 16:49:24.050 '***': order performed partially buy 1.00 at 62789 [#87849076 buy 10.00 / 7.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.050 FORTS Gateway #real     '***': order #87849076 buy 10.00 / 7.00 Si-6.18 at market filled due execution [filled order #87849076, buy 1.00 Si-6.18 at 62789 [based on deal '2026006057']], time: 3.40 ms
0       6       2018.04.25 16:49:24.053 FORTS Gateway #real     '***': deal performed [#48508927 buy 1.00 Si-6.18 at 62789]
0       6       2018.04.25 16:49:24.053 '***': order performed partially buy 1.00 at 62789 [#87849076 buy 10.00 / 8.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.053 FORTS Gateway #real     '***': order #87849076 buy 10.00 / 8.00 Si-6.18 at market filled due execution [filled order #87849076, buy 1.00 Si-6.18 at 62789 [based on deal '2026006058']], time: 1.49 ms
0       6       2018.04.25 16:49:24.054 FORTS Gateway #real     '***': deal performed [#48508928 buy 1.00 Si-6.18 at 62789]
0       6       2018.04.25 16:49:24.055 '***': order performed buy 1.00 at 62789 [#87849076 buy 10.00 / 9.00 Si-6.18 at market]
0       6       2018.04.25 16:49:24.055 FORTS Gateway #real     '***': order #87849076 buy 10.00 / 9.00 Si-6.18 at market filled due execution [filled order #87849076, buy 1.00 Si-6.18 at 62789 [based on deal '2026006059']], time: 4.03 ms

しかも、MT5の取引履歴が嘘のように、すべてが完璧に実行されたことがわかる。

 

特に、このことがよくわかります。

注文の 設定と実行に かかる時間は同じです :)

2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_DONE_MSC)) = 2018.04.25 16:49:23.000
2018.04.26 17:14:39.691 tTest (Si Splice,M15)   TimeMscToString(HistoryOrderGetInteger(87849076,ORDER_TIME_SETUP_MSC)) = 2018.04.25 16:49:23.000
 
prostotrader:

注文の 設定と実行に かかる時間は同じです :)

時間が秒の倍数であることが不思議な偶然です(ポイント以降にミリ秒がない)。

 
fxsaber:

そうすると、サーバーのログと時間が一致しないので、さらにナンセンスになります

さらに、MT5の取引履歴が嘘のように、すべてが完璧に実行されたことがわかる。


 
fxsaber:

時刻が秒の倍数になっているのは奇妙な偶然です(ドットの後にミリ秒がない)。

ああ、私もイライラするけど、サーバーの設定なんだろうな。

 
prostotrader:

特に、このことがよくわかります。

注文の 設定と実行に かかる時間は同じです :)

私はオトクリティからではない誰もが、それはそこに歴史にミリ秒がなくても同じであるか、何だろうか?

理由: