-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorder.py
32 lines (26 loc) · 984 Bytes
/
order.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from core import Core
from jict import walk
import sys, numpy as np
srv = Core()
srv.closeall()
model = srv.model(1)
for mod, valid, test, last in srv.df( split = False ):
# y = model.predict( np.array([last[0]]) )
y = model.predict( valid[0] )
for x, f in zip(y,valid[1]):
print(x[0],f[0])
# if not TEST_PROC:
# if buy > ORDER_ACT and sell < 0.5:
# srv.order( ins , True , WASTE_FOR_POSITION )
# if buy < 0.5 and sell > ORDER_ACT:
# srv.order( ins , False , WASTE_FOR_POSITION )
# if buy > 0.9 and sell < 0.5:
# if x[0] != 1: loss+=1
# print( 'buy', 'loss' if x[0] != 1 else 'win ' ,'|', round(i[0],4), round(i[1],4) , i )
# elif buy < 0.5 and sell > 0.9:
# if x[1] != 1: loss+=1
# print( 'sell', 'loss' if x[1] != 1 else 'win' ,'|', round(i[0],4), round(i[1],4) , i)
# else:
# skip += 1
# print( '---', x, round(i[0],4), round(i[1],4) , i)
exit()