For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

ibtest crash - what can be an issue?



  • python ibtest.py --data0 SPY-STK-ARCA --timeframe Seconds --data1 TLT-STK-ARCA --timeframe Seconds
    Server Version: 76
    TWS Time at connection:20190304 20:36:56 IST

    Strategy Created

    Timezone from ContractDetails: EST5EDT
    Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfuture.nj>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm.nj>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfuture>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:eufarm>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:euhmds>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds.nj>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:cashhmds>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:fundfarm>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds>
    ***** DATA NOTIF: DELAYED
    ***** DATA NOTIF: DELAYED
    SPY-STK-ARCA, 0001, 737122.7548148148, 2019-03-04T18:06:56.000000, 277.05, 277.06, 277.05, 277.06, 19, 0, nan
    SPY-STK-ARCA, 0002, 737122.7548263889, 2019-03-04T18:06:57.000000, 277.04, 277.04, 277.04, 277.04, 1, 0, nan
    SPY-STK-ARCA, 0003, 737122.7548379629, 2019-03-04T18:06:58.000000, 277.03, 277.03, 277.03, 277.03, 1, 0, nan
    SPY-STK-ARCA, 0004, 737122.754849537, 2019-03-04T18:06:59.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, nan
    SPY-STK-ARCA, 0005, 737122.754861111, 2019-03-04T18:07:00.000000, 277.0, 277.0, 277.0, 277.0, 5, 0, 277.032
    SPY-STK-ARCA, 0006, 737122.7548726852, 2019-03-04T18:07:01.000000, 276.98, 276.98, 276.97, 276.98, 27, 0, 277.01599999999996
    SPY-STK-ARCA, 0007, 737122.7548842593, 2019-03-04T18:07:02.000000, 277.0, 277.0, 277.0, 277.0, 10, 0, 277.008
    SPY-STK-ARCA, 0008, 737122.7548958333, 2019-03-04T18:07:03.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 277.002
    SPY-STK-ARCA, 0009, 737122.7549074074, 2019-03-04T18:07:04.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 276.996
    SPY-STK-ARCA, 0010, 737122.7549189815, 2019-03-04T18:07:05.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 276.996
    SPY-STK-ARCA, 0011, 737122.7549305556, 2019-03-04T18:07:06.000000, 276.98, 276.98, 276.97, 276.97, 9, 0, 276.994
    SPY-STK-ARCA, 0012, 737122.7549421296, 2019-03-04T18:07:07.000000, 276.97, 276.97, 276.97, 276.97, 0, 0, 276.988
    SPY-STK-ARCA, 0013, 737122.7549537037, 2019-03-04T18:07:08.000000, 276.96, 276.96, 276.94, 276.94, 22, 0, 276.976
    SPY-STK-ARCA, 0014, 737122.7549652777, 2019-03-04T18:07:09.000000, 276.93, 276.93, 276.93, 276.93, 6, 0, 276.962
    SPY-STK-ARCA, 0015, 737122.7549768519, 2019-03-04T18:07:10.000000, 276.92, 276.93, 276.91, 276.91, 17, 0, 276.944
    SPY-STK-ARCA, 0016, 737122.7549884259, 2019-03-04T18:07:11.000000, 276.92, 276.92, 276.92, 276.92, 16, 0, 276.934
    SPY-STK-ARCA, 0017, 737122.755, 2019-03-04T18:07:12.000000, 276.94, 276.94, 276.94, 276.94, 5, 0, 276.928
    SPY-STK-ARCA, 0018, 737122.755011574, 2019-03-04T18:07:13.000000, 276.95, 276.95, 276.95, 276.95, 3, 0, 276.93
    SPY-STK-ARCA, 0019, 737122.7550231481, 2019-03-04T18:07:14.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.934
    SPY-STK-ARCA, 0020, 737122.7550347223, 2019-03-04T18:07:15.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.942
    SPY-STK-ARCA, 0021, 737122.7550462963, 2019-03-04T18:07:16.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.948
    SPY-STK-ARCA, 0022, 737122.7550578704, 2019-03-04T18:07:17.000000, 276.97, 277.0, 276.97, 277.0, 6, 0, 276.96
    SPY-STK-ARCA, 0023, 737122.7550694444, 2019-03-04T18:07:18.000000, 277.02, 277.02, 277.02, 277.02, 12, 0, 276.974
    SPY-STK-ARCA, 0024, 737122.7550810185, 2019-03-04T18:07:19.000000, 277.02, 277.03, 277.02, 277.03, 7, 0, 276.98999999999995
    SPY-STK-ARCA, 0025, 737122.7550925926, 2019-03-04T18:07:20.000000, 277.01, 277.01, 277.01, 277.01, 3, 0, 277.002
    SPY-STK-ARCA, 0026, 737122.7551041667, 2019-03-04T18:07:21.000000, 277.01, 277.01, 277.01, 277.01, 1, 0, 277.014
    SPY-STK-ARCA, 0027, 737122.7551157407, 2019-03-04T18:07:22.000000, 277.0, 277.0, 277.0, 277.0, 3, 0, 277.014
    SPY-STK-ARCA, 0028, 737122.7551273148, 2019-03-04T18:07:23.000000, 277.0, 277.0, 276.99, 277.0, 11, 0, 277.01
    SPY-STK-ARCA, 0029, 737122.7551388888, 2019-03-04T18:07:24.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 277.004
    SPY-STK-ARCA, 0030, 737122.755150463, 2019-03-04T18:07:25.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 277.002
    SPY-STK-ARCA, 0031, 737122.7551620371, 2019-03-04T18:07:26.000000, 277.02, 277.02, 277.02, 277.02, 10, 0, 277.004
    SPY-STK-ARCA, 0032, 737122.7551736111, 2019-03-04T18:07:27.000000, 277.03, 277.03, 277.03, 277.03, 1, 0, 277.01
    SPY-STK-ARCA, 0033, 737122.7551851852, 2019-03-04T18:07:28.000000, 277.02, 277.02, 277.02, 277.02, 1, 0, 277.014
    SPY-STK-ARCA, 0034, 737122.7551967592, 2019-03-04T18:07:29.000000, 277.03, 277.03, 277.03, 277.03, 8, 0, 277.02
    SPY-STK-ARCA, 0035, 737122.7552083334, 2019-03-04T18:07:30.000000, 277.03, 277.05, 277.03, 277.05, 4, 0, 277.03
    SPY-STK-ARCA, 0036, 737122.7552199074, 2019-03-04T18:07:31.000000, 277.06, 277.06, 277.06, 277.06, 13, 0, 277.038
    SPY-STK-ARCA, 0037, 737122.7552314815, 2019-03-04T18:07:32.000000, 277.06, 277.06, 277.06, 277.06, 0, 0, 277.044
    SPY-STK-ARCA, 0038, 737122.7552430555, 2019-03-04T18:07:33.000000, 277.06, 277.06, 277.06, 277.06, 0, 0, 277.052
    SPY-STK-ARCA, 0039, 737122.7552546297, 2019-03-04T18:07:34.000000, 277.06, 277.06, 277.06, 277.06, 0, 0, 277.058
    SPY-STK-ARCA, 0040, 737122.7552662037, 2019-03-04T18:07:35.000000, 277.06, 277.06, 277.06, 277.06, 0, 0, 277.06
    SPY-STK-ARCA, 0041, 737122.7552777778, 2019-03-04T18:07:36.000000, 277.06, 277.06, 277.06, 277.06, 1, 0, 277.06
    SPY-STK-ARCA, 0042, 737122.7552893518, 2019-03-04T18:07:37.000000, 277.06, 277.06, 277.05, 277.05, 2, 0, 277.058
    SPY-STK-ARCA, 0043, 737122.7553009259, 2019-03-04T18:07:38.000000, 277.08, 277.08, 277.08, 277.08, 5, 0, 277.062
    SPY-STK-ARCA, 0044, 737122.7553125, 2019-03-04T18:07:39.000000, 277.08, 277.08, 277.08, 277.08, 0, 0, 277.066
    SPY-STK-ARCA, 0045, 737122.7553240741, 2019-03-04T18:07:40.000000, 277.08, 277.08, 277.08, 277.08, 0, 0, 277.07
    SPY-STK-ARCA, 0046, 737122.7553356482, 2019-03-04T18:07:41.000000, 277.08, 277.08, 277.08, 277.08, 0, 0, 277.07399999999996
    SPY-STK-ARCA, 0047, 737122.7553472222, 2019-03-04T18:07:42.000000, 277.07, 277.07, 277.07, 277.07, 12, 0, 277.078
    SPY-STK-ARCA, 0048, 737122.7553587963, 2019-03-04T18:07:43.000000, 277.08, 277.08, 277.08, 277.08, 5, 0, 277.078
    SPY-STK-ARCA, 0049, 737122.7553703703, 2019-03-04T18:07:44.000000, 277.08, 277.08, 277.07, 277.07, 5, 0, 277.07599999999996
    SPY-STK-ARCA, 0050, 737122.7553819445, 2019-03-04T18:07:45.000000, 277.08, 277.1, 277.08, 277.09, 18, 0, 277.078
    SPY-STK-ARCA, 0051, 737122.7553935185, 2019-03-04T18:07:46.000000, 277.09, 277.09, 277.09, 277.09, 0, 0, 277.08
    SPY-STK-ARCA, 0052, 737122.7554050926, 2019-03-04T18:07:47.000000, 277.09, 277.09, 277.09, 277.09, 0, 0, 277.08399999999995
    SPY-STK-ARCA, 0053, 737122.7554166666, 2019-03-04T18:07:48.000000, 277.07, 277.07, 277.06, 277.06, 14, 0, 277.08
    SPY-STK-ARCA, 0054, 737122.7554282408, 2019-03-04T18:07:49.000000, 277.07, 277.07, 277.07, 277.07, 1, 0, 277.08
    SPY-STK-ARCA, 0055, 737122.7554398148, 2019-03-04T18:07:50.000000, 277.05, 277.05, 277.05, 277.05, 1, 0, 277.072
    SPY-STK-ARCA, 0056, 737122.7554513889, 2019-03-04T18:07:51.000000, 277.03, 277.03, 277.03, 277.03, 1, 0, 277.06
    SPY-STK-ARCA, 0057, 737122.755462963, 2019-03-04T18:07:52.000000, 277.05, 277.05, 277.05, 277.05, 1, 0, 277.052
    SPY-STK-ARCA, 0058, 737122.755474537, 2019-03-04T18:07:53.000000, 277.05, 277.05, 277.05, 277.05, 0, 0, 277.05
    SPY-STK-ARCA, 0059, 737122.7554861112, 2019-03-04T18:07:54.000000, 277.05, 277.05, 277.05, 277.05, 0, 0, 277.046
    SPY-STK-ARCA, 0060, 737122.7554976852, 2019-03-04T18:07:55.000000, 277.05, 277.05, 277.05, 277.05, 0, 0, 277.046
    SPY-STK-ARCA, 0061, 737122.7555092593, 2019-03-04T18:07:56.000000, 277.04, 277.04, 277.04, 277.04, 1, 0, 277.048
    SPY-STK-ARCA, 0062, 737122.7555208333, 2019-03-04T18:07:57.000000, 277.04, 277.04, 277.04, 277.04, 0, 0, 277.046
    SPY-STK-ARCA, 0063, 737122.7555324074, 2019-03-04T18:07:58.000000, 277.04, 277.04, 277.04, 277.04, 0, 0, 277.044
    SPY-STK-ARCA, 0064, 737122.7555439814, 2019-03-04T18:07:59.000000, 277.05, 277.05, 277.05, 277.05, 2, 0, 277.044
    SPY-STK-ARCA, 0065, 737122.7555555556, 2019-03-04T18:08:00.000000, 277.05, 277.05, 277.05, 277.05, 0, 0, 277.044
    SPY-STK-ARCA, 0066, 737122.7555671296, 2019-03-04T18:08:01.000000, 277.01, 277.01, 277.0, 277.0, 5, 0, 277.036
    SPY-STK-ARCA, 0067, 737122.7555787037, 2019-03-04T18:08:02.000000, 277.01, 277.01, 277.01, 277.01, 3, 0, 277.03000000000003
    SPY-STK-ARCA, 0068, 737122.7555902777, 2019-03-04T18:08:03.000000, 277.01, 277.01, 277.01, 277.01, 0, 0, 277.024
    SPY-STK-ARCA, 0069, 737122.7556018519, 2019-03-04T18:08:04.000000, 277.02, 277.02, 277.02, 277.02, 1, 0, 277.018
    SPY-STK-ARCA, 0070, 737122.755613426, 2019-03-04T18:08:05.000000, 277.02, 277.03, 277.02, 277.03, 84, 0, 277.014
    SPY-STK-ARCA, 0071, 737122.755625, 2019-03-04T18:08:06.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.02
    SPY-STK-ARCA, 0072, 737122.7556365741, 2019-03-04T18:08:07.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.024
    SPY-STK-ARCA, 0073, 737122.7556481481, 2019-03-04T18:08:08.000000, 277.01, 277.01, 277.01, 277.01, 1, 0, 277.024
    SPY-STK-ARCA, 0074, 737122.7556597223, 2019-03-04T18:08:09.000000, 277.01, 277.01, 277.01, 277.01, 0, 0, 277.022
    SPY-STK-ARCA, 0075, 737122.7556712963, 2019-03-04T18:08:10.000000, 277.01, 277.01, 277.01, 277.01, 0, 0, 277.018
    SPY-STK-ARCA, 0076, 737122.7556828704, 2019-03-04T18:08:11.000000, 277.01, 277.01, 277.01, 277.01, 0, 0, 277.014
    SPY-STK-ARCA, 0077, 737122.7556944444, 2019-03-04T18:08:12.000000, 277.01, 277.01, 277.01, 277.01, 0, 0, 277.01
    SPY-STK-ARCA, 0078, 737122.7557060185, 2019-03-04T18:08:13.000000, 277.03, 277.03, 277.03, 277.03, 1, 0, 277.014
    SPY-STK-ARCA, 0079, 737122.7557175925, 2019-03-04T18:08:14.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.018
    SPY-STK-ARCA, 0080, 737122.7557291667, 2019-03-04T18:08:15.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.022
    SPY-STK-ARCA, 0081, 737122.7557407407, 2019-03-04T18:08:16.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.02599999999995
    SPY-STK-ARCA, 0082, 737122.7557523148, 2019-03-04T18:08:17.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.03
    SPY-STK-ARCA, 0083, 737122.7557638889, 2019-03-04T18:08:18.000000, 277.03, 277.03, 277.03, 277.03, 0, 0, 277.03
    SPY-STK-ARCA, 0084, 737122.755775463, 2019-03-04T18:08:19.000000, 277.0, 277.0, 277.0, 277.0, 1, 0, 277.024
    SPY-STK-ARCA, 0085, 737122.7557870371, 2019-03-04T18:08:20.000000, 277.0, 277.0, 277.0, 277.0, 1, 0, 277.018
    SPY-STK-ARCA, 0086, 737122.7557986111, 2019-03-04T18:08:21.000000, 277.0, 277.0, 277.0, 277.0, 3, 0, 277.012
    SPY-STK-ARCA, 0087, 737122.7558101852, 2019-03-04T18:08:22.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 277.006
    SPY-STK-ARCA, 0088, 737122.7558217592, 2019-03-04T18:08:23.000000, 277.0, 277.0, 277.0, 277.0, 0, 0, 277.0
    SPY-STK-ARCA, 0089, 737122.7558333334, 2019-03-04T18:08:24.000000, 276.97, 276.97, 276.95, 276.95, 9, 0, 276.99
    SPY-STK-ARCA, 0090, 737122.7558449074, 2019-03-04T18:08:25.000000, 276.98, 276.98, 276.92, 276.92, 32, 0, 276.974
    SPY-STK-ARCA, 0091, 737122.7558564815, 2019-03-04T18:08:26.000000, 276.93, 276.93, 276.91, 276.91, 11, 0, 276.956
    SPY-STK-ARCA, 0092, 737122.7558680555, 2019-03-04T18:08:27.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.938
    SPY-STK-ARCA, 0093, 737122.7558796296, 2019-03-04T18:08:28.000000, 276.95, 276.95, 276.95, 276.95, 2, 0, 276.928
    SPY-STK-ARCA, 0094, 737122.7558912036, 2019-03-04T18:08:29.000000, 276.93, 276.93, 276.92, 276.93, 15, 0, 276.92400000000004
    SPY-STK-ARCA, 0095, 737122.7559027778, 2019-03-04T18:08:30.000000, 276.93, 276.93, 276.93, 276.93, 0, 0, 276.92600000000004
    SPY-STK-ARCA, 0096, 737122.7559143519, 2019-03-04T18:08:31.000000, 276.94, 276.94, 276.85, 276.86, 131, 0, 276.916
    SPY-STK-ARCA, 0097, 737122.7559259259, 2019-03-04T18:08:32.000000, 276.86, 276.9, 276.85, 276.9, 61, 0, 276.914
    SPY-STK-ARCA, 0098, 737122.7559375, 2019-03-04T18:08:33.000000, 276.89, 276.89, 276.89, 276.89, 39, 0, 276.902
    SPY-STK-ARCA, 0099, 737122.755949074, 2019-03-04T18:08:34.000000, 276.9, 276.92, 276.9, 276.92, 6, 0, 276.9
    SPY-STK-ARCA, 0100, 737122.7559606482, 2019-03-04T18:08:35.000000, 276.92, 276.92, 276.92, 276.92, 0, 0, 276.898
    SPY-STK-ARCA, 0101, 737122.7559722222, 2019-03-04T18:08:36.000000, 276.92, 276.92, 276.92, 276.92, 0, 0, 276.90999999999997
    SPY-STK-ARCA, 0102, 737122.7559837963, 2019-03-04T18:08:37.000000, 276.95, 276.95, 276.92, 276.92, 24, 0, 276.91400000000004
    SPY-STK-ARCA, 0103, 737122.7559953703, 2019-03-04T18:08:38.000000, 276.92, 276.92, 276.92, 276.92, 27, 0, 276.92
    SPY-STK-ARCA, 0104, 737122.7560069445, 2019-03-04T18:08:39.000000, 276.92, 276.92, 276.92, 276.92, 0, 0, 276.92
    SPY-STK-ARCA, 0105, 737122.7560185185, 2019-03-04T18:08:40.000000, 276.93, 276.93, 276.92, 276.92, 3, 0, 276.92
    SPY-STK-ARCA, 0106, 737122.7560300926, 2019-03-04T18:08:41.000000, 276.92, 276.92, 276.92, 276.92, 0, 0, 276.92
    SPY-STK-ARCA, 0107, 737122.7560416666, 2019-03-04T18:08:42.000000, 276.91, 276.91, 276.91, 276.91, 13, 0, 276.918
    SPY-STK-ARCA, 0108, 737122.7560532407, 2019-03-04T18:08:43.000000, 276.91, 276.91, 276.91, 276.91, 2, 0, 276.91600000000005
    SPY-STK-ARCA, 0109, 737122.7560648149, 2019-03-04T18:08:44.000000, 276.91, 276.91, 276.91, 276.91, 1, 0, 276.91400000000004
    SPY-STK-ARCA, 0110, 737122.7560763889, 2019-03-04T18:08:45.000000, 276.91, 276.91, 276.91, 276.91, 1, 0, 276.91200000000003
    SPY-STK-ARCA, 0111, 737122.756087963, 2019-03-04T18:08:46.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.91
    SPY-STK-ARCA, 0112, 737122.756099537, 2019-03-04T18:08:47.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.91
    SPY-STK-ARCA, 0113, 737122.7561111111, 2019-03-04T18:08:48.000000, 276.91, 276.91, 276.91, 276.91, 1, 0, 276.91
    SPY-STK-ARCA, 0114, 737122.7561226852, 2019-03-04T18:08:49.000000, 276.91, 276.91, 276.91, 276.91, 5, 0, 276.91
    SPY-STK-ARCA, 0115, 737122.7561342593, 2019-03-04T18:08:50.000000, 276.91, 276.91, 276.91, 276.91, 5, 0, 276.91
    SPY-STK-ARCA, 0116, 737122.7561458333, 2019-03-04T18:08:51.000000, 276.92, 276.92, 276.92, 276.92, 1, 0, 276.91200000000003
    SPY-STK-ARCA, 0117, 737122.7561574074, 2019-03-04T18:08:52.000000, 276.91, 276.91, 276.9, 276.91, 13, 0, 276.91200000000003
    SPY-STK-ARCA, 0118, 737122.7561689814, 2019-03-04T18:08:53.000000, 276.91, 276.91, 276.91, 276.91, 2, 0, 276.91200000000003
    SPY-STK-ARCA, 0119, 737122.7561805556, 2019-03-04T18:08:54.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.91200000000003
    SPY-STK-ARCA, 0120, 737122.7561921297, 2019-03-04T18:08:55.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.91200000000003
    SPY-STK-ARCA, 0121, 737122.7562037037, 2019-03-04T18:08:56.000000, 276.9, 276.9, 276.9, 276.9, 1, 0, 276.908
    SPY-STK-ARCA, 0122, 737122.7562152778, 2019-03-04T18:08:57.000000, 276.9, 276.9, 276.9, 276.9, 1, 0, 276.906
    SPY-STK-ARCA, 0123, 737122.7562268518, 2019-03-04T18:08:58.000000, 276.89, 276.89, 276.89, 276.89, 9, 0, 276.902
    SPY-STK-ARCA, 0124, 737122.756238426, 2019-03-04T18:08:59.000000, 276.87, 276.87, 276.86, 276.86, 2, 0, 276.892
    SPY-STK-ARCA, 0125, 737122.75625, 2019-03-04T18:09:00.000000, 276.86, 276.86, 276.86, 276.86, 5, 0, 276.88199999999995
    SPY-STK-ARCA, 0126, 737122.7562615741, 2019-03-04T18:09:01.000000, 276.86, 276.87, 276.86, 276.87, 5, 0, 276.87600000000003
    SPY-STK-ARCA, 0127, 737122.7562731481, 2019-03-04T18:09:02.000000, 276.88, 276.88, 276.88, 276.88, 3, 0, 276.872
    SPY-STK-ARCA, 0128, 737122.7562847222, 2019-03-04T18:09:03.000000, 276.88, 276.88, 276.88, 276.88, 0, 0, 276.87
    SPY-STK-ARCA, 0129, 737122.7562962963, 2019-03-04T18:09:04.000000, 276.88, 276.9, 276.88, 276.9, 4, 0, 276.878
    SPY-STK-ARCA, 0130, 737122.7563078704, 2019-03-04T18:09:05.000000, 276.9, 276.9, 276.89, 276.89, 5, 0, 276.884
    SPY-STK-ARCA, 0131, 737122.7563194444, 2019-03-04T18:09:06.000000, 276.91, 276.91, 276.88, 276.91, 62, 0, 276.892
    SPY-STK-ARCA, 0132, 737122.7563310185, 2019-03-04T18:09:07.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.898
    SPY-STK-ARCA, 0133, 737122.7563425926, 2019-03-04T18:09:08.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.904
    SPY-STK-ARCA, 0134, 737122.7563541667, 2019-03-04T18:09:09.000000, 276.91, 276.91, 276.91, 276.91, 0, 0, 276.90600000000006
    SPY-STK-ARCA, 0135, 737122.7563657408, 2019-03-04T18:09:10.000000, 276.92, 276.93, 276.92, 276.92, 13, 0, 276.91200000000003
    SPY-STK-ARCA, 0136, 737122.7563773148, 2019-03-04T18:09:11.000000, 276.93, 276.95, 276.93, 276.95, 38, 0, 276.92
    SPY-STK-ARCA, 0137, 737122.7563888889, 2019-03-04T18:09:12.000000, 276.96, 276.96, 276.94, 276.94, 3, 0, 276.92600000000004
    SPY-STK-ARCA, 0138, 737122.7564004629, 2019-03-04T18:09:13.000000, 276.94, 276.94, 276.94, 276.94, 0, 0, 276.932
    SPY-STK-ARCA, 0139, 737122.7564120371, 2019-03-04T18:09:14.000000, 276.94, 276.94, 276.94, 276.94, 0, 0, 276.938
    SPY-STK-ARCA, 0140, 737122.7564236111, 2019-03-04T18:09:15.000000, 276.96, 276.96, 276.96, 276.96, 1, 0, 276.946
    SPY-STK-ARCA, 0141, 737122.7564351852, 2019-03-04T18:09:16.000000, 276.98, 276.98, 276.98, 276.98, 1, 0, 276.952
    SPY-STK-ARCA, 0142, 737122.7564467592, 2019-03-04T18:09:17.000000, 276.98, 276.98, 276.98, 276.98, 0, 0, 276.96
    SPY-STK-ARCA, 0143, 737122.7564583333, 2019-03-04T18:09:18.000000, 276.98, 276.98, 276.98, 276.98, 0, 0, 276.968
    SPY-STK-ARCA, 0144, 737122.7564699074, 2019-03-04T18:09:19.000000, 276.96, 276.96, 276.96, 276.96, 1, 0, 276.97200000000004
    SPY-STK-ARCA, 0145, 737122.7564814815, 2019-03-04T18:09:20.000000, 276.96, 276.96, 276.96, 276.96, 0, 0, 276.97200000000004
    SPY-STK-ARCA, 0146, 737122.7564930556, 2019-03-04T18:09:21.000000, 276.96, 276.96, 276.96, 276.96, 0, 0, 276.96799999999996
    SPY-STK-ARCA, 0147, 737122.7565046296, 2019-03-04T18:09:22.000000, 276.95, 276.95, 276.95, 276.95, 8, 0, 276.962
    SPY-STK-ARCA, 0148, 737122.7565162037, 2019-03-04T18:09:23.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.956
    SPY-STK-ARCA, 0149, 737122.7565277778, 2019-03-04T18:09:24.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.954
    SPY-STK-ARCA, 0150, 737122.7565393519, 2019-03-04T18:09:25.000000, 276.93, 276.93, 276.93, 276.93, 1, 0, 276.948
    SPY-STK-ARCA, 0151, 737122.7565509259, 2019-03-04T18:09:26.000000, 276.93, 276.93, 276.93, 276.93, 0, 0, 276.942
    SPY-STK-ARCA, 0152, 737122.7565625, 2019-03-04T18:09:27.000000, 276.93, 276.93, 276.93, 276.93, 0, 0, 276.938
    SPY-STK-ARCA, 0153, 737122.756574074, 2019-03-04T18:09:28.000000, 276.94, 276.94, 276.94, 276.94, 3, 0, 276.93600000000004
    SPY-STK-ARCA, 0154, 737122.7565856482, 2019-03-04T18:09:29.000000, 276.96, 276.96, 276.96, 276.96, 1, 0, 276.938
    SPY-STK-ARCA, 0155, 737122.7565972222, 2019-03-04T18:09:30.000000, 276.96, 276.96, 276.96, 276.96, 4, 0, 276.944
    SPY-STK-ARCA, 0156, 737122.7566087963, 2019-03-04T18:09:31.000000, 276.96, 276.96, 276.96, 276.96, 0, 0, 276.95
    SPY-STK-ARCA, 0157, 737122.7566203703, 2019-03-04T18:09:32.000000, 276.96, 276.96, 276.96, 276.96, 0, 0, 276.956
    SPY-STK-ARCA, 0158, 737122.7566319444, 2019-03-04T18:09:33.000000, 276.95, 276.95, 276.95, 276.95, 2, 0, 276.95799999999997
    SPY-STK-ARCA, 0159, 737122.7566435186, 2019-03-04T18:09:34.000000, 276.95, 276.95, 276.95, 276.95, 0, 0, 276.956
    Traceback (most recent call last):
    File "ibtest.py", line 559, in <module>
    runstrategy()
    File "ibtest.py", line 337, in runstrategy
    cerebro.run(exactbars=args.exactbars)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1127, in run
    runstrat = self.runstrategies(iterstrat)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1298, in runstrategies
    self._runnext(runstrats)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1630, in _runnext
    strat._next()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 347, in _next
    super(Strategy, self)._next()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/lineiterator.py", line 260, in _next
    clock_len = self._clk_update()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 327, in _clk_update
    newdlens = [len(d) for d in self.datas]
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 327, in <listcomp>
    newdlens = [len(d) for d in self.datas]
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/lineseries.py", line 464, in len
    return len(self.lines)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/lineseries.py", line 220, in len
    return len(self.lines[0])
    ValueError: len() should return >= 0

    or this crash

    SPY-STK-ARCA, 1808, 737122.8692903125, 2019-03-04T20:51:46.683001, 278.99, 278.99, 278.99, 278.99, 7, 0, 278.994
    TLT-STK-ARCA, 1792, 737122.8693287037, 2019-03-04T20:51:50.000000, 119.65, 119.65, 119.65, 119.65, 0, 0, nan
    ***** DATA NOTIF: LIVE
    SPY-STK-ARCA, 1809, 737122.8693019097, 2019-03-04T20:51:47.684997, 278.98, 278.98, 278.98, 278.98, 8, 0, 278.99
    TLT-STK-ARCA, 1792, 737122.869345544, 2019-03-04T20:51:51.455003, 119.65, 119.65, 119.65, 119.65, 2, 0, nan
    Traceback (most recent call last):
    File "ibtest.py", line 559, in <module>
    runstrategy()
    File "ibtest.py", line 337, in runstrategy
    cerebro.run(exactbars=args.exactbars)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1127, in run
    runstrat = self.runstrategies(iterstrat)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1298, in runstrategies
    self._runnext(runstrats)
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/cerebro.py", line 1630, in _runnext
    strat._next()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 347, in _next
    super(Strategy, self)._next()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/lineiterator.py", line 260, in _next
    clock_len = self._clk_update()
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 332, in _clk_update
    for d in self.datas if len(d))
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/strategy.py", line 332, in <genexpr>
    for d in self.datas if len(d))
    File "/Users/roman/anaconda3/envs/backtrader/lib/python3.7/site-packages/backtrader/linebuffer.py", line 163, in getitem
    return self.array[self.idx + ago]
    IndexError: deque index out of range



  • very simple test - generate crash, but when i add --resample it's pass ok.

    $ python ibtest.py --data0 EUR.USD-CASH-IDEALPRO --timeframe Seconds --data1 GBP.USD-CASH-IDEALPRO --timeframe Seconds
    Server Version: 76
    TWS Time at connection:20190305 10:03:38 IST

    Strategy Created

    Timezone from ContractDetails: EST5EDT
    Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm.nj>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfuture>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:eufarm>
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:usfarm>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:euhmds>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds.nj>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:cashhmds>
    ***** STORE NOTIF: <error id=-1, errorCode=2106, errorMsg=HMDS data farm connection is OK:ushmds>
    ***** DATA NOTIF: DELAYED
    ***** DATA NOTIF: DELAYED
    ***** STORE NOTIF: <error id=-1, errorCode=2104, errorMsg=Market data farm connection is OK:cashfarm>
    Data0, 0001, 737123.3150231482, 2019-03-05T02:33:38.000000, 1.13214, 1.13215, 1.13213, 1.13215, -1, 0, nan
    Data1, 0001, 737123.3150231482, 2019-03-05T02:33:38.000000, 1.3158, 1.31581, 1.3158, 1.31581, -1, 0, nan
    Data0, 0002, 737123.3150347222, 2019-03-05T02:33:39.000000, 1.13215, 1.13215, 1.13215, 1.13215, -1, 0, nan
    Data1, 0002, 737123.3150347222, 2019-03-05T02:33:39.000000, 1.31581, 1.31582, 1.3158, 1.31581, -1, 0, nan
    Data0, 0003, 737123.3150462963, 2019-03-05T02:33:40.000000, 1.13215, 1.13215, 1.13214, 1.13214, -1, 0, nan
    .
    .
    .
    Data0, 1797, 737123.3358101852, 2019-03-05T03:03:34.000000, 1.13288, 1.13289, 1.13288, 1.13289, -1, 0, 1.132882
    Data1, 1797, 737123.3358101852, 2019-03-05T03:03:34.000000, 1.31841, 1.31841, 1.3184, 1.3184, -1, 0, nan
    Data0, 1798, 737123.3358217593, 2019-03-05T03:03:35.000000, 1.13289, 1.13289, 1.13289, 1.13289, -1, 0, 1.132884
    Data1, 1798, 737123.3358217593, 2019-03-05T03:03:35.000000, 1.3184, 1.3184, 1.3184, 1.3184, -1, 0, nan
    Data0, 1799, 737123.3358333333, 2019-03-05T03:03:36.000000, 1.13289, 1.13289, 1.13289, 1.13289, -1, 0, 1.132886
    Data1, 1799, 737123.3358333333, 2019-03-05T03:03:36.000000, 1.3184, 1.3184, 1.3184, 1.3184, -1, 0, nan
    Data0, 1800, 737123.3358449074, 2019-03-05T03:03:37.000000, 1.13289, 1.13289, 1.13285, 1.13287, -1, 0, 1.132884
    Data1, 1800, 737123.3358449074, 2019-03-05T03:03:37.000000, 1.3184, 1.31841, 1.3184, 1.31841, -1, 0, nan
    ***** DATA NOTIF: LIVE
    ***** DATA NOTIF: LIVE
    Data0, 1801, 737123.3358670359, 2019-03-05T03:03:38.911901, 1.13287, 1.13287, 1.13287, 1.13287, 0, 0, 1.132882
    Data1, 1800, 737123.3358677853, 2019-03-05T03:03:38.976647, 1.31841, 1.31841, 1.31841, 1.31841, 0, 0, nan
    Data0, 1801, 737123.3359080319, 2019-03-05T03:03:42.453956, 1.13285, 1.13285, 1.13285, 1.13285, 0, 0, 1.132874
    Data1, 1801, 737123.3358797303, 2019-03-05T03:03:40.008697, 1.31842, 1.31842, 1.31842, 1.31842, 0, 0, nan
    Traceback (most recent call last):
    File "ibtest.py", line 558, in <module>
    runstrategy()
    File "ibtest.py", line 336, in runstrategy
    cerebro.run(exactbars=args.exactbars)
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/cerebro.py", line 1127, in run
    runstrat = self.runstrategies(iterstrat)
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/cerebro.py", line 1298, in runstrategies
    self._runnext(runstrats)
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/cerebro.py", line 1630, in _runnext
    strat._next()
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/strategy.py", line 347, in _next
    super(Strategy, self)._next()
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/lineiterator.py", line 260, in _next
    clock_len = self._clk_update()
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/strategy.py", line 332, in _clk_update
    for d in self.datas if len(d))
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/strategy.py", line 332, in <genexpr>
    for d in self.datas if len(d))
    File "/Users/roman/anaconda3/envs/backtrader36/lib/python3.6/site-packages/backtrader/linebuffer.py", line 163, in getitem
    return self.array[self.idx + ago]
    IndexError: deque index out of range



  • when only one item it's not crash. crash only when 2 or more.


Log in to reply
 

});