交易所的限价单滑点统计 - 页 3

 

开始用bx做模拟mt5账户。你将会收到一封电子邮件,里面有一个分发的链接。在服务器选择阶段,你选择的不是模拟服务器,而是真实交易。用任意的数据创建一个账户。创建一个证书。所有你有一个零 余额的真实账户,有真实的报价和历史记录。

 
pivomoe:

开始用bx做模拟mt5账户。你将会收到一封电子邮件,里面有一个分发的链接。在服务器选择阶段,你选择的不是模拟服务器,而是真实交易。用任意的数据创建一个账户。创建一个证书。所有你有一个零 余额的真实账户,有真实的报价和历史。

酷 - 它的工作,谢谢你天和地--演示和真实的蜱虫数据。再次感谢!
 
fxsaber:

在 "基于真实点位 "模式下,限价订单的正向滑点比 "基于生成点位 "模式下高出约50%。

这就造成了一个误区--我们引入了真实的点位,以提高测试器的准确性,但却引入了限价订单的正向滑移,人为地在回测结果上徘徊。

在交易所,限价订单不会滑点,而是完全按照订单价格执行。但在测试器中,情况并非如此。

这个错误可以通过使用上面链接中描述的库来避免。但这是一个拐杖式的解决方案。当测试器本身准确地工作时,它是有意义的。

我正在征求论坛成员对这个问题的意见。因为,由于明显的原因,社区的一个成员的意见很不被开发商所重视。

很遗憾,没有人说出来。
 
fxsaber:
很遗憾,没有人对此有发言权。

这个话题已经在论坛的某个地方讨论过了,开发者自己似乎也说过他们会在新版本中解决这个问题。试着找找看,我没有真正进入到它...

P.s. 这里的题目,也是没有答案的https://www.mql5.com/ru/forum/86591/page4

В билде 1340 MT5 очень странное исполнение отложенных ордеров на FOREX в тестере стратегий
В билде 1340 MT5 очень странное исполнение отложенных ордеров на FOREX в тестере стратегий
  • 评论: 1
  • www.mql5.com
Если тестировать на «OHLC на M1», то ВСЕ ордера исполняются с проскальзыванием в 30-50 пятизначных пунктов...
 
Maxim Dmitrievsky:

这个话题已经在论坛的某个地方讨论过了,开发者自己似乎也说过他们会在新版本中解决这个问题。试着找找看,我没有真正进入到它...

P.s. 这里有一个话题,也是未回答的 https://www.mql5.com/ru/forum/86591/page4

他们没有修复它。
 
fxsaber:
很遗憾没有人说话。

因为你没有任何的证据基础。

保存报告并将其压缩起来要容易得多。给我看一个有计算结果的交易实例。

 
Renat Fatkhullin:

因为你没有任何的证据基础。

保存报告并将其压缩起来要容易得多。用报表展示一个单一交易的例子。

以为这样就够了https://www.mql5.com/ru/code/16134。

知道了,我去准备。

SlipPage
SlipPage
  • 投票: 10
  • 2016.08.25
  • fxsaber
  • www.mql5.com
Расчет проскальзываний совершенных сделок в валюте счета.
 

顾问

#define OP_BUY ORDER_TYPE_BUY
#define OP_SELL ORDER_TYPE_SELL
#define OP_BUYLIMIT ORDER_TYPE_BUY_LIMIT
#define OP_SELLLIMIT ORDER_TYPE_SELL_LIMIT

// Кусок из https://www.mql5.com/ru/code/16006
class MT4ORDERS
{  
public:   
  static int MT4OrderSend( const string Symb, const int Type, const double dVolume, const double Price, const int SlipPage, const double SL, const double TP,
                            const string comment = NULL, const int magic = 0, const datetime dExpiration = 0, color arrow_color = clrNONE )
  {
    MqlTradeRequest Request = {0};

    Request.action = (((Type == OP_BUY) || (Type == OP_SELL)) ? TRADE_ACTION_DEAL : TRADE_ACTION_PENDING);
    Request.magic = magic;

    Request.symbol = ((Symb == NULL) ? ::Symbol() : Symb);
    Request.volume = dVolume;
    Request.price = Price;

    Request.tp = TP;
    Request.sl = SL;
    Request.deviation = SlipPage;
    Request.type = (ENUM_ORDER_TYPE)Type;

    Request.type_filling = ORDER_FILLING_RETURN;

    if (dExpiration > 0)
    {
      Request.type_time = ORDER_TIME_SPECIFIED;
      Request.expiration = dExpiration;
    }

    Request.comment = comment;

    MqlTradeResult Result;

    return(::OrderSend(Request, Result) ? ((Request.action == TRADE_ACTION_DEAL) ? (int)Result.deal : (int)Result.order) : -1);
  }

  // Такая перегрузка позволяет использоваться совместно и MT5-вариант OrderSend
  static bool MT4OrderSend( const MqlTradeRequest &Request, MqlTradeResult &Result )
  {
    return(::OrderSend(Request, Result));
  }
};

// Обязательно ПОСЛЕ #include <Trade/Trade.mqh>: CTrade::OrderSend
#define OrderSend MT4ORDERS::MT4OrderSend

void OnTick( void )
{
  static int TicketBuyLimit = 0;
  static int TicketSellLimit = 0;
  
  const datetime time = TimeCurrent();
  
  if ((time == D'2016.08.11 19:12:33') && (TicketBuyLimit == 0))
    TicketBuyLimit = OrderSend(Symbol(), OP_BUYLIMIT, 1, 95090, 0, 0, 0);
  else if ((time == D'2016.08.16 18:44:02') && (TicketSellLimit == 0))
    TicketSellLimit = OrderSend(Symbol(), OP_SELLLIMIT, 1, 97070, 0, 0, 0);

  return;
}

测试员日志

MR      0       16:47:50.960    Tester  RTS-9.16: ticks data begins from 2016.08.01 00:00
LE      0       16:47:50.963    Core 1  agent process started
CE      0       16:47:51.473    Core 1  connecting to 127.0.0.1:3000
NR      0       16:47:52.736    Core 1  connected
DJ      0       16:47:52.741    Core 1  authorized (agent build 1401)
RR      0       16:47:52.743    Tester  RTS-9.16,M1 (BCS-MetaTrader5): testing of Experts\LimitsFill.ex5 from 2016.08.11 00:00 to 2016.08.17 00:00
GP      0       16:47:52.763    Core 1  common synchronization completed
DI      0       16:47:52.780    Core 1  RTS-9.16: ticks synchronized already [47 bytes]
IL      0       16:47:53.493    Core 1  1482 bytes of tester parameters loaded
PH      0       16:47:53.493    Core 1  188 bytes of input parameters loaded
OR      0       16:47:53.493    Core 1  8562 bytes of symbols list loaded
MI      0       16:47:53.493    Core 1  expert file added: Experts\LimitsFill.ex5. 8164 bytes loaded
FR      0       16:47:53.493    Core 1  initial deposit 100000.00 RUR, leverage 1:0
EI      0       16:47:53.493    Core 1  successfully initialized
IS      0       16:47:53.493    Core 1  35 Kb of total initialization data received
QJ      0       16:47:53.493    Core 1  Intel Core i7-2700 K  @ 3.50 GHz, 16301 MB
LR      0       16:47:53.493    Core 1  RTS-9.16: symbol to be synchronized
PF      0       16:47:53.493    Core 1  RTS-9.16: symbol synchronized, 3224 bytes of symbol info received
RJ      0       16:47:53.493    Core 1  RTS-9.16: load 31 bytes of history data to synchronize in 0:00:00.000
PM      0       16:47:53.493    Core 1  RTS-9.16: history synchronized from 2015.06.22 to 2016.09.01
IS      0       16:47:53.493    Core 1  RTS-9.16: ticks synchronization started
JD      0       16:47:53.493    Core 1  RTS-9.16: load 38 bytes of tick data to synchronize in 0:00:00.000
NO      0       16:47:53.493    Core 1  RTS-9.16: history ticks synchronized from 2016.08.01 to 2016.09.01
RI      0       16:47:53.493    Core 1  RTS-9.16,M1: history cache allocated for 610971 bars and contains 43890 bars from 2015.06.22 10:02 to 2016.08.10 23:49
CM      0       16:47:53.493    Core 1  RTS-9.16,M1: history begins from 2015.06.22 10:02
DD      0       16:47:53.493    Core 1  RTS-9.16,M1 (BCS-MetaTrader5): generating based on real ticks
ML      0       16:47:53.493    Core 1  RTS-9.16,M1: testing of Experts\LimitsFill.ex5 from 2016.08.11 00:00 to 2016.08.17 00:00 started
LQ      3       16:47:53.493    Core 1  RTS-9.16 : real ticks begin from 2016.08.01 00:00:00
GK      0       16:47:53.493    Core 1  2016.08.11 19:12:33   buy limit 1.00 RTS-9.16 at 95090 (95260 / 95270 / 95270)
EK      0       16:47:53.493    Core 1  2016.08.11 19:40:17   order [#2  buy limit 1.00 RTS-9.16 at 95090] triggered
GJ      0       16:47:53.493    Core 1  2016.08.11 19:40:17   deal #2  buy 1.00 RTS-9.16 at 95050 done (based on order #2)
 GR      0       16:47:53.493    Core 1  2016.08.11 19:40:17   deal performed [#2  buy 1.00 RTS-9.16 at 95050]
GP      0       16:47:53.493    Core 1  2016.08.11 19:40:17   order performed buy 1.00 at 95050 [#2  buy limit 1.00 RTS-9.16 at 95090]
QR      0       16:47:53.493    Core 1  2016.08.16 18:44:02   sell limit 1.00 RTS-9.16 at 97070 (97020 / 97030 / 97020)
GF      0       16:47:53.493    Core 1  2016.08.16 19:00:00   order [#3  sell limit 1.00 RTS-9.16 at 97070] triggered
CG      0       16:47:53.493    Core 1  2016.08.16 19:00:00   deal #3  sell 1.00 RTS-9.16 at 97170 done (based on order #3)
 FJ      0       16:47:53.493    Core 1  2016.08.16 19:00:00   deal performed [#3  sell 1.00 RTS-9.16 at 97170]
DO      0       16:47:53.493    Core 1  2016.08.16 19:00:00   order performed sell 1.00 at 97170 [#3  sell limit 1.00 RTS-9.16 at 97070]
KR      0       16:47:53.493    Core 1  final balance 102788.71 RUR
IF      0       16:47:53.493    Core 1  RTS-9.16,M1: 1122105 ticks, 3240 bars generated. Test passed in 0:00:00.717 (including ticks preprocessing 0:00:00.124).
JE      0       16:47:53.493    Core 1  252 Mb memory used including 35 Mb of history data, 64 Mb of tick data
KK      0       16:47:53.493    Core 1  log file "C:\Program Files\BCS Broker MetaTrader 5 Terminal\Tester\Agent-127.0.0.1-3000\logs\20160902.log" written
DJ      0       16:47:53.507    Core 1  connection closed

限价订单的滑点用粗体字标出。当限价订单经过一个时段时,测试器中的滑移情况更糟糕--在开盘时。但我并没有把这些案例作为一个例子。我采取了通常的市场。

它是可重复的吗?

不幸的是,调试不工作,所以不方便创建一个例子

关于交易、自动交易系统和策略测试的论坛

虫子、虫子、问题

fxsaber, 2016.09.01 20:18

在RTS-9.16 BCS-MetaTrader5上无法通过CTRL+F5对EA 进行调试。测试人员写道
Tester  Leverage 1:1 set error


 
我有同样的问题。股票和期货都出现下滑。
 
fxsaber:

顾问

测试员日志

限价订单的滑点用粗体字标出。当限价订单经过一个时段时,测试器中的滑移情况更糟糕--在开盘时。但我并没有把这些案例作为一个例子。我采取了通常的市场。

它是可重复的吗?

不幸的是,调试并不奏效,所以不方便创建一个例子


不要在测试器中尝试,而是在演示中尝试(更好的开放,它有更高的速度)。