コード例 #1
0
 public OHLCBars(NinjaTrader.Data.IDataSeries o,
                 NinjaTrader.Data.IDataSeries h,
                 NinjaTrader.Data.IDataSeries l,
                 NinjaTrader.Data.IDataSeries c)
 {
     opens = o; highs = h; lows = l; closes = c;
     update();
 }
コード例 #2
0
 public InputBars(NinjaTrader.Data.IDataSeries i)
 {
     input  = i;
     opens  = input[0];
     closes = opens;
     highs  = opens;
     lows   = opens;
 }
コード例 #3
0
        public static OHLC createPrimary(PrimaryOHLC type,
                                         NinjaTrader.Data.IDataSeries o,
                                         NinjaTrader.Data.IDataSeries h,
                                         NinjaTrader.Data.IDataSeries l,
                                         NinjaTrader.Data.IDataSeries c,
                                         NinjaTrader.Data.IDataSeries inp)
        {
            OHLC ans = null;

            switch (type)
            {
            case PrimaryOHLC.BARS:
                ans = new OHLCBars(o, h, l, c);
                break;

            case PrimaryOHLC.INPUTS:
                ans = new InputBars(inp);
                break;
            }
            return(ans);
        }