Guest User

bitfinex

a guest
Aug 1st, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.42 KB | None | 0 0
  1. def main_call():
  2.     try:
  3.         l0_0 = getDiff('btcusd',8)
  4.         l1_0 = np.tanh(l0_0*0.8446488687)
  5.  
  6.         l1_1 = np.tanh(l0_0*-0.5674069006)
  7.         l1_2 = np.tanh(l0_0*0.8676766445)
  8.         l1_3 = np.tanh(l0_0*0.5200611473)
  9.         l1_4 = np.tanh(l0_0*-0.2215499554)
  10.  
  11. ############### lots of calculation to get value of l3_0######################################
  12.  
  13.         l3_0 = np.tanh(l2_0*-0.1366382003 + l2_1*0.8161960822 + l2_2*-0.9458773183 + \
  14.         l2_3*0.4692969576 + l2_4*0.0126710629 + l2_5*-0.0403001012 + l2_6*-0.0116244898 + l2_7*-0.4874816289 + l2_8*\
  15.         -0.6392241448 + l2_9*-0.410338398 + l2_10*-0.1181027081 + l2_11*0.1075562037 + l2_12*-0.5948728252 \
  16.         +l2_13*0.5593677345 + l2_14*-0.3642935247 + l2_15*-0.2867603217 + l2_16*0.142250271 + l2_17*-0.0535698019 \
  17.         +l2_18*-0.034007685 + l2_19*-0.3594532426 + l2_20*0.2551095195 + l2_21*0.4214344983 + l2_22*0.8941621336 \
  18.         +l2_23*0.6283377368 + l2_24*-0.7138020667 + l2_25*-0.1426738249 + l2_26*0.172671223 + l2_27*0.0714824385 \
  19.         +l2_28*-0.3268182144 + l2_29*-0.0078989755 + l2_30*-0.2032828145 + l2_31*-0.0260631534 + l2_32*0.4918037012)
  20.    
  21.         if(l3_0>0):
  22.             print l3_0
  23.             print auto_order_buy('0.01',str(ticker_last('btcusd')))
  24.         elif(l3_0<0):  
  25.             print l3_0
  26.             print auto_order_sell('0.01',str(ticker_last('btcusd')))
  27.         else:
  28.             pass
  29.     except:
  30.          pass
Add Comment
Please, Sign In to add comment