Example #1
0
        private int getRandomEntryTime()
        {
            int hhmmss = DateTimeFunc.getHHMMSS();
            int lsec   = DateTimeFunc.hhmmss2Secs(hhmmss) + Misc.getRandom(600, 6000);

            return(DateTimeFunc.secs2hhmmss(lsec));
        }
Example #2
0
        private void pushDel(Path path)
        {
            List <double> hi       = path.high;
            List <double> lo       = path.low;
            List <int>    hhmmss   = path.hhmmss;
            List <int>    yyyymmdd = path.yyyymmdd;

            int len = hi.Count;


            for (int i = nSeconds; i < len; i++)
            {
                double lmax         = hi.GetRange(i - nSeconds, nSeconds).Max();
                double lmin         = lo.GetRange(i - nSeconds, nSeconds).Min();
                int    hhmmss_start = hhmmss[i - nSeconds];
                int    hhmmss_stop  = hhmmss[i];
                int    secDel       = DateTimeFunc.hhmmss2Secs(hhmmss_stop) - DateTimeFunc.hhmmss2Secs(hhmmss_start);
                double ldel         = lmax - lmin;
                if (secDel <= nSeconds)
                {
                    delList.Add(ldel);
                }
            }
        }