import talib
import jqdatasdk
import numpy as np
import PyBase.Util as util
import time
from functools import reduce

cond_er = 0.8
cond_before_er = 0.8
cond_after_er = 1.2
adx_timeperiod = 4
adx_edge = 30
fast_ema = 6
slow_ema = 11
timeArr = util.getTimeSerial(starttime='2018-11-06 09:20:00',
                             count=2000000,
                             periodSec=61)
df = None
security = 'SC8888.XINE'
frequency = '30m'
msg = {
    'df': df,
    'position': 0,
    'force_waiting_count': 0,
    'open': 0,
    'clearRates': [],
    'tmp_rates_every_step': [],
    'open_after_next_change': False
}

Example #2
0
import StrategyBody as sb
from StrategyBody import TickHandler
import PyBase.Util as util
th = TickHandler()

sb.security = 'L8888.XDCE'

timeArr = util.getTimeSerial(starttime='2019-03-15 14:15:00', count=200000, periodSec=61)
for nowTimeString in timeArr:
    msg = th.handleOneTick(nowTimeString=nowTimeString)