Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main_call():
- try:
- l0_0 = getDiff('btcusd',8)
- l1_0 = np.tanh(l0_0*0.8446488687)
- l1_1 = np.tanh(l0_0*-0.5674069006)
- l1_2 = np.tanh(l0_0*0.8676766445)
- l1_3 = np.tanh(l0_0*0.5200611473)
- l1_4 = np.tanh(l0_0*-0.2215499554)
- ############### lots of calculation to get value of l3_0######################################
- l3_0 = np.tanh(l2_0*-0.1366382003 + l2_1*0.8161960822 + l2_2*-0.9458773183 + \
- l2_3*0.4692969576 + l2_4*0.0126710629 + l2_5*-0.0403001012 + l2_6*-0.0116244898 + l2_7*-0.4874816289 + l2_8*\
- -0.6392241448 + l2_9*-0.410338398 + l2_10*-0.1181027081 + l2_11*0.1075562037 + l2_12*-0.5948728252 \
- +l2_13*0.5593677345 + l2_14*-0.3642935247 + l2_15*-0.2867603217 + l2_16*0.142250271 + l2_17*-0.0535698019 \
- +l2_18*-0.034007685 + l2_19*-0.3594532426 + l2_20*0.2551095195 + l2_21*0.4214344983 + l2_22*0.8941621336 \
- +l2_23*0.6283377368 + l2_24*-0.7138020667 + l2_25*-0.1426738249 + l2_26*0.172671223 + l2_27*0.0714824385 \
- +l2_28*-0.3268182144 + l2_29*-0.0078989755 + l2_30*-0.2032828145 + l2_31*-0.0260631534 + l2_32*0.4918037012)
- if(l3_0>0):
- print l3_0
- print auto_order_buy('0.01',str(ticker_last('btcusd')))
- elif(l3_0<0):
- print l3_0
- print auto_order_sell('0.01',str(ticker_last('btcusd')))
- else:
- pass
- except:
- pass
Add Comment
Please, Sign In to add comment