English Русский Español Deutsch 日本語 Português
验证流言: 全日交易取决于亚洲时段的交易行情

验证流言: 全日交易取决于亚洲时段的交易行情

MetaTrader 4交易 | 8 四月 2016, 14:51
4 661 2
Игорь
Игорь

简介

你好! 作为一个在外汇交易市场有一定经验也有数次损失的人,我认为我有权讨论这个话题。

如果我们省去冗词的话,那么整个技术分析本质上而言仅是找到模式而已,这已经不是秘密了。 例如,如果我们发现,在新月和午夜时,美元价格在第一声鸡鸣前,有 95% 概率 会开始下跌,则你自然而然会在此时根据此信息进行交易。

浏览外汇交易论坛以找到对交易有用的信息,我发现有许多不同的说法被奉为普遍真理。 MTV 频道有个节目叫“流言终结者”,这个节目的主持人会通过实践来检验所谓的“普世真理”,然后表明其真伪。

我效仿了他们,也决定检验部分被所谓的外汇交易专家奉为真理的说法。 今天,我们要检查以下说法:



“全日交易取决于亚洲时段的交易行情”。

爱因斯坦认为,一切都是相对的,一旦我们推敲任何陈述细节的话,我们会 马上 相信他说的是对的。 例如,有个问题是关于亚洲市场的交易时间的。 让我们来看一看以下图表,交易时间如下所示。

地区 城市 冬季时间
开市
冬季时间
收市
夏季时间
开市
夏季时间
收市
亚洲 东京
香港
新加坡
03:00
04:00
04:00
11:00
12:00
12:00
04:00
05:00
04:00
12:00
13:00
12:00
欧洲 法兰克福
苏黎世
巴黎
伦敦
9:00
9:00
9:00
10:00
17:00
17:00
17:00
18:00
09:00
09:00
09:00
10:00
17:00
17:00
17:00
18:00
美洲 纽约
芝加哥
16:00
17:00
24:00
01:00
16:00
17:00
24:00
01:00
大洋洲 威灵顿
悉尼
00:00
01:00
08:00
09:00
00:00
01:00
08:00
09:00

表 1 外汇交易时段

我们可以发现,亚洲交易时段在冬令时开始于 3:00,结束于 12:00,在夏令时开始于 4:00,结束于 13:00。 但欧洲的交易时间开始于 9.00。 那么问题来了 - 亚洲市场的开放时间到底是 3.00 到 9.00 还是 3.00 到 13.00? 另一个问题是关于服务器时间,由于不同经纪人的服务器时间不同,故没有必要与莫斯科时间保持一致,还有一个问题是关于冬令时/夏令时的时间调整 - 部分经纪人并不做此调整。 因此,我们需要将此纳入我们的研究范围内。 “..全日交易取决于此”是什么意思? 如果亚洲时段行情上涨,价格是否会持续涨至下一个时段?

首先,让我们来看看图 1。 该时段已用 Igor Kim 开发的指标 “i-Sessions” 涂上了不同颜色。 从 3.00 到 13.00 的时段填充为黑色(“亚洲”)。 欧洲时段(9.00 至 18.00)涂上了较浅颜色,美洲时段(16.00 至 24.00)则为最浅颜色。

图 1 NZDUSD 交易时段图

我将进一步详细描述,以帮助新手了解透彻。

因此,我的 Expert Advisor “1-Session” 设计用于解决以下问题:

必须计算时段开盘和收盘的价位,而时段由我们指定。 让我们假设如果时段的开盘价位高于收盘价位,则该时段为下跌行情,反之则为上涨行情。

如果开盘价位等于收盘价位,则行情中性。

我试着对所有的 Expert Advisor 代码进行注释,以令新手(包括我在内)易于理解。

//+------------------------------------------------------------------+
//|                                                    1-Session.mq4 |
//|                                Copyright © 2009, Igor Alexandrov |
//|                                                sydiya@rambler.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Igor Alexandrov"
#property link      "sydiya@rambler.ru"

//---- Input parameters
extern string  Open_session =  "01:00"; //Opening time of the session to study
extern string  Close_session = "10:00"; //Closing time of the session to study
extern int Day_kol_vo = 50;             //Number of days to study
extern int Hour_kol_vo = 15;            //Number of hours to study after the session
extern int Profit = 20;                 //Take Profit value to verify

//----------------------------------------------------------------------------
string Symb;                            //Trade symbol of the expert attached
//----------------------------Starting----------------------------------------

int start()
  { //the main bracket begins
   int  Shift_open_H1,       //Number of hourly bar with the same opening time as daily bar
   Shift_open_bars_session,  //Number of hourly bar, that opens the session     
   Shift_close_bars_session, //Number of hourly bar, that closes the session
   STOP_LEVER=0;             //Minimal distance for TP and SL

   double Open_bars_session, //Opening price of the first bar of the session
   Close_bars_session,       //Closing price of the last bar of the session
   Vira_session,             //Maximal price of the session
   Total_TP=0,               //Counter of Take Profit executions
   Total_SL=0,               //Counter of Stop Loss executions
   Total_day=0,              //Number of days to study
   Total_SL_TP=0,            //Counter of neutral sessions
   Maina_session;            //Minimal price of the session

   datetime Time_open_day,   //Opening time of the i-th daily bar
   Time_open_session,        //Opening time of the session (datetime format)
   Time_close_session;       //Closing time of the session (datetime format)

   string String_open_H1;    //Opening time of the first hourly bar of the day to study
                             //as string format "yyyy.mm.dd"
   bool   Session_buy=false, //Bullish session flag
   Session_sell=false;       //Bearish session flag
   Symb=Symbol();            //Symbol name

   //Minimal distance for TP and SL
   STOP_LEVER=MarketInfo(Symb,MODE_STOPLEVEL);

   // daily bars cycle
   for(int i=Day_kol_vo;i>0;i --)
     { //bracket for daily bars cycle

      //Counter for days studied
      Total_day++;

      //opening time of the i-th daily bar
      Time_open_day=iTime(Symb,PERIOD_D1,i);

      //number of hourly bar with the same opening time as daily bar
      Shift_open_H1=iBarShift(Symb,PERIOD_H1,Time_open_day,false);

      //convert opening time of the first hourly bar to the string like "yyyy.mm.dd"
      String_open_H1=TimeToStr(Time_open_day,TIME_DATE);

      //opening time for the session to study (in the datetime format)
      Time_open_session=StrToTime(String_open_H1+" "+Open_session);

      //number of hourly bar from which session begins
      Shift_open_bars_session=iBarShift(Symb,PERIOD_H1,Time_open_session,false);

      //closing time of the session to study (in datetime format)
      Time_close_session=StrToTime(String_open_H1+" "+Close_session);

      //number of last hourly bar of the session
      Shift_close_bars_session=iBarShift(Symb,PERIOD_H1,Time_close_session,false);

      //opening price of the first bar of the session
      Open_bars_session=iOpen(Symb,PERIOD_H1,Shift_open_bars_session);

      //closing price of the last bar of the session
      Close_bars_session=iClose(Symb,PERIOD_H1,Shift_close_bars_session);

      //finding the maximal price of the session
      Vira_session=iHigh(Symb,PERIOD_H1,iHighest(Symb,PERIOD_H1,MODE_HIGH,
      (Shift_open_bars_session-Shift_close_bars_session),Shift_close_bars_session));

      //finding the minimal price of the session
      Maina_session=iLow(Symb,PERIOD_H1,iLowest(Symb,PERIOD_H1,MODE_LOW,
      (Shift_open_bars_session-Shift_close_bars_session),Shift_close_bars_session));

      // the opening price is greater than closing price, session is Bearish
      if(Open_bars_session>Close_bars_session)
        {
         Session_buy=false;
         Session_sell=true;
        }

      //The opening price is lower than closing price, session is bullish      
      if(Open_bars_session<Close_bars_session)
        {
         Session_buy=true;
         Session_sell=false;
        }

      //The opening price is equal to closing price, session is Neutral
      if(Open_bars_session==Close_bars_session)
        {
         Session_buy=false;
         Session_sell=false;
        }
      // hours counter for checking
      int PEREBOR=0;

      //Cycle for hourly bars in the i-th day
      for(int j=Shift_close_bars_session;j>Shift_close_bars_session-Hour_kol_vo;j --)
        {//Opening bracket for the hourly bars cycle

         //hours counter (for checking)
         PEREBOR++;

         //if session is bullish
         if(Session_buy==true && Session_sell==false)
           {
            //if maximal price of the hourly bar
            //is greater than (closing price of the session+Profit+Minimal distance)
            if(iHigh(Symb,PERIOD_H1,j-PEREBOR)>(Close_bars_session+(Profit+STOP_LEVER)*Point))
              {
               Total_TP++;     //Take Profit executed
               break;          //break the cycle(hourly bars)
              }
            //if minimal price of the hourly bar
            //is lower than minimal price of the session
            if(iLow(Symb,PERIOD_H1,j-PEREBOR)<Maina_session)
              {
               Total_SL++;     //Stop Loss executed
               break;          //break the cycle(hourly bars)
              }
           }
         //if session is bearish
         if(Session_buy==false && Session_sell==true)
           {
            //if maximal price of the hourly bar 
            //is greater than maximal price of the session
            if(iHigh(Symb,PERIOD_H1,j-PEREBOR)>Vira_session)
              {
               Total_SL++;      //Stop Loss executed
               break;           //break the cycle(hourly bars)
              }
            //if minimal price of the hourly bar 
            //is lower than (closing price of the session-(Profit + Minimal distance))
            if(iLow(Symb,PERIOD_H1,j-PEREBOR)<(Close_bars_session-(Profit+STOP_LEVER)*Point))
              {
               Total_TP++;      //Take Profit executed              
               break;           //break the cycle(hourly bars)
              }
           }
         //if session is neutral
         if(Session_buy==false && Session_sell==false)
           {
            Total_SL_TP++;      //Increase the counter
            break;              //break the cycle(hourly bars)
           }

        } // closing bracket for the hourly bars cycle

      double Pro_Total_TP=(Total_TP/Total_day)*100, //Probabiility of TP execution
      Pro_Total_SL=(Total_SL/Total_day)*100,        //Probability of SL execution
      Pro_Total_SL_TP=(Total_SL_TP/Total_day)*100;  //Probability of neutral sessions
      int Total_no=Total_day-Total_SL-Total_TP-Total_SL_TP; //TP and SL hasn't executed
      double Pro_Total_no =(Total_no/Total_day)*100;        //Probability that TP and SL will not executed
      Comment("Checked ",Total_day," days","\n",
              "Session Opening time  ",Open_session," Session Closing time ",
              Close_session," Number of hours to check after the session ",Hour_kol_vo," Profit ",Profit,"\n",
              "Take profit has executed ",Total_TP," times","\n",
              "Stop Loss has executed ",Total_SL," times","\n",
              "The neutral sessions was ",Total_SL_TP," times","\n",
              "Neither SL/TP executed ",Total_no," times","\n",
              "Probability for Take Profit execution ",Pro_Total_TP," %","\n",
              "Probability for Stop Loss execution ",Pro_Total_SL," %","\n",
              "Probability for neutral sessions ",Pro_Total_SL_TP," %","\n",
              "Probability that SL and TP will not executed ",Pro_Total_no," %");

     } //Closing bracket for the daily bars

   return(0);

  } //-the main bracket ends 

现在,让我们仔细查看代码以理解已经实施的检查办法。 例如,如果该时段行情下跌,让我们在低于该时段收盘价的某个价位模仿获利: (Profit+STOP_LEVER), 此处的 Profit (可更改) 以点数表示。 假设价格开始下跌,则将持续下跌,牛市也是如此(但正好相反)。

STOP_LEVER 是经纪人允许的与当前价位的最近距离。 没有必要对其定义,因其是 自动计算得出的

真实的获利水平,由你在 Expert Advisor 的参数窗口(参数利润)中定义,距离 STOP_LEVER 所设价格稍远一些,不同经纪人和不同货币对的值不同。 该水平设计用于在模仿中获得真实结果。 例如,如果你尝试下单交易黄金,真实交易中要获得 5 点利润,则你无法完成,因为据我所见,和当前价格之间的最小距离为 50 点。

现在,让我们考虑止损。 一般来说,你可以简单计算已放入价格方向(乃为时段而定义)的获利目标实现的概率。 但这看起来并不完整。 不仅是计算有利可图的订单,而且要计算带来损失的订单,这会很有趣,而且更重要。

让我们再来看看图 1。 我们可以看到以下情况。 如果亚洲时段整体而言是上扬的,则价格不会跌至该时段最低价位以下。 图 1 中,2009 年 11 月份交易时段,3.00 至 13.00 以垂直线注明。 我们可以看到,该时段整体上扬,因为开盘价低于收盘价,我们假设止损水平应为该时段的最低价位。 对于行情下跌的时段,如你所说的那样,止损水平应设置为最高价位。

我们进行检查的目的是将虚拟的获利水平和已计算的止损水平考虑在内,并通过历史记录来计算两者的执行情况。

因此,Expert Advisor 的输入参数(和我们在“输入”选项卡中可以更改的相同)如下:


图 2 expert advisor 输入参数


开盘 – 该时段的开盘时间,

_ – 该时段的收盘时间,

Day_kol_vo 历史记录中的天数(例如,值等于 50,则意为 expert 将在计算中使用最后 50 天,我不建议使用太大的数值),

Hour_kol_vo - 小时数。 该参数定义了收盘后的小时数(expert 将在计算中使用该参数)。 在随附的数据中,我使用的是到下一时段之前的小时数。 如果我们研究 3.00 至 13.00 之间的时间,则下一时段的该值等于 14。

利润 – 是距离该时段的收盘价的点数。 实际上,这是我们虚拟获利的水平。

计算概率很简单 - 对获利而言,是用分析天数的执行数字,除以这些天数,然后乘以 100,结果以百分比表示。

相应的,对于止损而言,是用分析天数的执行数字,除以这些天数,然后乘以 100。

中性时段的计算同样如此。

Expert Advisor 的工作和其安装有关的部分细节。 首先,和往常一样,我们将 Expert Advisor 复制到 experts 文件夹内进行编译。 随后,我们将其附加在任何时间范围(首选小时制),设定我们需要的时间和其他上述参数,然后让其开始交易。 系统不交易,因为不含任何交易函数,系统将在图表的左下角打印信息(计算天数、参数、获利和止损的执行次数、中性时段数量以及 获利和止损执行的概率)。

让我们记住 - 没有必要在历史记录测试程序内对其进行测试。 只需要将其绑定,等待价格变动,查看结果,如有必要则更改输入参数,等待新的价格变动,将结果保存到某处,最后解除绑定。 或许它应设计为指标,但当前我不想改变它,可能会在未来这么做。

如果价格变动过于频繁,则你可以使用客户端内的 “Expert Advisors” 键来禁用 Expert Advisor。

现在让我们讨论这一主题。 让我们再来看看下表。 该表填满了 Expert Advisor 数日前于 11 月 10 日计算的数据。 我没有使用更深入的历史记录,而是使用了最后 50 天。 “交易”时间(买或卖)从 3.00 至 13.00 之间选出(完整亚洲时段),从3.00 至 9.00(完整亚洲时段,不含欧洲时段),以及 9.00 至 13.00(亚洲和欧洲共同时段)。


时间段

3.00-13.00

3.00-13.00

3.00-13.00

3.00-9.00

3.00-9.00

3.00-9.00

9.00-13.00

9.00-13.00

9.00-13.00


说明

利润-5

利润-15
利润-25
利润-5
利润-15
利润-25
利润-5
利润-15
利润-25
USDJPY 获利执行 %
74
58
50
78
64
52
70
52
44
USDJPY 止损执行 %
24
36
44
22
36
48
30
48
56
USDJPY 中性时段 %
2
2
2
0
0
0
0
0
0
USDJPY 没有执行 %
0
4
4
0
0
0
0
0
0
EURUSD 获利执行 %
100
72
64
68
62
54
76
66
62
EURUSD 止损执行 %
0
28
36
32
38
46
24
34
38
EURUSD 中性时段 %
0
0
0
0
0
0
0
0
0
EURUSD 没有执行 %
0
0
0
0
0
0
0
0
0
GBPJPY 获利执行 %
72
62
54
72
66
50
78
64
56
GBPJPY 止损执行 %
28
34
42
28
34
50
22
34
42
GBPJPY 中性时段 %
0
0
0
0
0
0
0
0
0
GBPJPY 没有执行 %
0
4
4
0
0
0
0
2
2
NZDUSD 获利执行 %
80
66
56
74
58
50
68
58
46
NZDUSD 止损执行 %
20
34
42
24
40
48
30
40
52
NZDUSD 中性时段 %
0
0
0
2
2
2
2
2
2
NZDUSD 没有执行 %
0
0
0
0
0
0
0
0
0

表 2 最终概率(%)

如我们所见,我没有使用大的获利值,该值为 5,15 和 25 点。



总结

你可从表 2 看到, “全日交易取决于亚洲时段的交易行情”的说法是错误的,至少在过去 50 天内对于这四种货币对而言是错误的。

执行 5 点获利的概率接近 60-70%,在此情况下,我认为这属于抛硬币的 概率 。 我有着自己的观点。

对于 EURUSD 货币对而言,执行 5 点获利的概率为 100%。 这意味着,如果 我根据亚洲时段的趋势在 13.00 进行交易, 则在过去 50 天内, 我总是会以 5 点获利成功交易。 我能说什么呢 - 很遗憾我对此并不知情。 对追求利润点的人而言,该结果可作为额外信息使用,采用更深入历史记录(100 天或以上)的研究将获得更加清晰的结果。

Expert Advisor 带来的价值并非唯一证据:它的结果证明日内亚洲和其他时段之间不存在关联。 有些人尝试找出部分交易时间之间的交易关系,现在可无需经过 繁琐人工计算,便可实现这个想法。

本文附有指标 TradeSession.mq4 (有人或许想在客户端使用) 以及 Expert Advisor 1-Session.mq4

本文由MetaQuotes Ltd译自俄文
原文地址: https://www.mql5.com/ru/articles/1575

附加的文件 |
1-_Session.mq4 (8.44 KB)
TradeSessions.mq4 (7.98 KB)

该作者的其他文章

最近评论 | 前往讨论 (2)
liming pan
liming pan | 26 7月 2017 在 13:56
Игорь你好,谢谢你,我已拜读😊👍
Jian Chen
Jian Chen | 27 7月 2017 在 10:42

非常支持作者的工作,给出的EA也很有用,可以用来统计类似的其他问题。

作者的结论是否定了这个流言,但是就像作者提到的,在EURUSD 50天的结果中,5点获利胜率竟然是100%。

移步到本文章的英文版中,回复更多,很多人对这个胜率很感兴趣(俄文版回复更多,可惜看不懂 :)).

但有个回复说的比较明白,主要是这获利和止损点位差距太大,比如5点获利50点止损,那么获利的胜率肯定比较高,所以是否值得搞个EA碰运气,还是看各人的想法了 :)

FANN2MQL 神经网络教学 FANN2MQL 神经网络教学
本文将利用一个简单的例子为你演示如何通过 FANN2MQL 来使用神经网络:教给神经网络一个简单的模式,然后测试它是否能够识别从未见过的模式。
烛台方向统计再现的研究 烛台方向统计再现的研究
是否能够基于烛台方向的再现趋势,在一天内的特定时间预测市场在即将到来的一小段时间内的市场行为? 即,是否可以在第一时间找出此类事件。 每个交易者可能都想过这个问题。 本文的目的是尝试基于烛台在特定时间间隔内的统计再现来预测市场行为。
Meta 交易者持仓报告 - 在 MetaTrader 4 中进行美国商品期货交易委员会报告分析的新领域 Meta 交易者持仓报告 - 在 MetaTrader 4 中进行美国商品期货交易委员会报告分析的新领域
本文关于在 MetaTrader 中使用美国商品期货交易委员会(CFTC)的报告数据。 文章详细描述了所讨论的 META 交易者持仓报告(COT)项目,展示了如何加载和处理必要的信息。 项目中包含的 Expert Advisor 将帮助我们分析文章中给出概念的有效性。 最后,我们将得出一些结论并提供有用的建议。
过滤的魔力 过滤的魔力
大部分自动化交易系统开发员会使用某种形式的交易信号过滤。 在本文中,我们将探索带通滤波和 Expert Advisor 离散滤波器的创造和实施,以提高自动交易系统的特性。