hxh989898 发表于 2016-5-2 18:13:35

请问如何在5分钟K线图表示昨天最高收盘价(要考虑夜盘)

各位老师好。我将R-Break公式变形时有一段代码,需要计算昨天最高价、昨天最高收盘价、昨天最低收盘价、昨天最低价。这在IF000等无夜盘的商品,是没问题的。但商品期货多数有夜盘,而且夜盘9:00是第二天的开盘。请问,如何表示有夜盘的商品的昨天最高价、昨天最高收盘价、昨天最低收盘价、昨天最低价。
---------
if(Date != Date)
{
       kk=Hitoday+lclosetoday+hiclosetoday+ltoday)
        …………      
        hitoday=High;
        ltoday=Low;
        Hiclosetoday=close;
        lclosetoday=close;
               


}
    …………
if(High>hitoday)
{
        hitoday=High;
}
if(Low<ltoday)
{
        ltoday=Low;
}

if(close>hiclosetoday)
{
        hiclosetoday=close;
}
if(close<lclosetoday)
{
        lclosetoday=close;
}
页: [1]
查看完整版本: 请问如何在5分钟K线图表示昨天最高收盘价(要考虑夜盘)