onesecondtrader 0.29.0__py3-none-any.whl → 0.30.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onesecondtrader/indicators/__init__.py +6 -0
- onesecondtrader/indicators/bar.py +47 -0
- {onesecondtrader-0.29.0.dist-info → onesecondtrader-0.30.0.dist-info}/METADATA +1 -1
- {onesecondtrader-0.29.0.dist-info → onesecondtrader-0.30.0.dist-info}/RECORD +6 -5
- {onesecondtrader-0.29.0.dist-info → onesecondtrader-0.30.0.dist-info}/WHEEL +0 -0
- {onesecondtrader-0.29.0.dist-info → onesecondtrader-0.30.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from onesecondtrader import events
|
|
2
|
+
from .base import Indicator
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Open(Indicator):
|
|
6
|
+
@property
|
|
7
|
+
def name(self) -> str:
|
|
8
|
+
return "OPEN"
|
|
9
|
+
|
|
10
|
+
def _compute_indicator(self, incoming_bar: events.BarReceived) -> float:
|
|
11
|
+
return incoming_bar.open
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class High(Indicator):
|
|
15
|
+
@property
|
|
16
|
+
def name(self) -> str:
|
|
17
|
+
return "HIGH"
|
|
18
|
+
|
|
19
|
+
def _compute_indicator(self, incoming_bar: events.BarReceived) -> float:
|
|
20
|
+
return incoming_bar.high
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Low(Indicator):
|
|
24
|
+
@property
|
|
25
|
+
def name(self) -> str:
|
|
26
|
+
return "LOW"
|
|
27
|
+
|
|
28
|
+
def _compute_indicator(self, incoming_bar: events.BarReceived) -> float:
|
|
29
|
+
return incoming_bar.low
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Close(Indicator):
|
|
33
|
+
@property
|
|
34
|
+
def name(self) -> str:
|
|
35
|
+
return "CLOSE"
|
|
36
|
+
|
|
37
|
+
def _compute_indicator(self, incoming_bar: events.BarReceived) -> float:
|
|
38
|
+
return incoming_bar.close
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Volume(Indicator):
|
|
42
|
+
@property
|
|
43
|
+
def name(self) -> str:
|
|
44
|
+
return "VOLUME"
|
|
45
|
+
|
|
46
|
+
def _compute_indicator(self, incoming_bar: events.BarReceived) -> float:
|
|
47
|
+
return float(incoming_bar.volume) if incoming_bar.volume is not None else 0.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onesecondtrader
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.30.0
|
|
4
4
|
Summary: The Trading Infrastructure Toolkit for Python. Research, simulate, and deploy algorithmic trading strategies — all in one place.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Nils P. Kujath
|
|
@@ -7,7 +7,8 @@ onesecondtrader/events/bases.py,sha256=g-ykq2jgcitIAueRurUlqAq0jINQwuhSWi_khAniP
|
|
|
7
7
|
onesecondtrader/events/market.py,sha256=IfHuIGfp_IUiw-dFay4c4RYmkoNzshxbhuWTglBqfN0,509
|
|
8
8
|
onesecondtrader/events/requests.py,sha256=2KXwSckiar9-fy8wkN3vcSIeOkeBfeo_XhUhrNKEd2Q,831
|
|
9
9
|
onesecondtrader/events/responses.py,sha256=w_BH1nkkPyxQjh30EXEVFcUGDoMprFc2PuAaqpVrQ8A,1436
|
|
10
|
-
onesecondtrader/indicators/__init__.py,sha256=
|
|
10
|
+
onesecondtrader/indicators/__init__.py,sha256=sGRS3cpN2yLBYws66eVeqY-bAIHg0o6pgFvrkzZtm0Q,170
|
|
11
|
+
onesecondtrader/indicators/bar.py,sha256=0H07mKNiUx5cE1fQvx1oPVY0R_MXcmAAgsLek175vTk,1115
|
|
11
12
|
onesecondtrader/indicators/base.py,sha256=WGqjp9mmkR2PZ5ZC8zL9ddeTfUrB0hX3bjnq1W4HKuI,1658
|
|
12
13
|
onesecondtrader/messaging/__init__.py,sha256=vMRDabHBgse_vZRTRFtnU8M8v2sY_o4pHjGzgu3hp3E,115
|
|
13
14
|
onesecondtrader/messaging/eventbus.py,sha256=Y8VbDZlEz8Q6KcCkfXRKsVIixsctBMRW1a5ANw297Ls,1576
|
|
@@ -15,7 +16,7 @@ onesecondtrader/messaging/subscriber.py,sha256=ImpFmu5IstLXLoKVMaebmLp5MXN6225vH
|
|
|
15
16
|
onesecondtrader/models/__init__.py,sha256=cH5xyniz78MQjM9_-fFdP1ZW6FFLTmayMwQauFO23bU,135
|
|
16
17
|
onesecondtrader/models/data.py,sha256=TqUvTtjpmzTJT8ZdTYnlVoyI7Qck2IsseCazWZxJgD0,173
|
|
17
18
|
onesecondtrader/models/orders.py,sha256=y6Ar-6fMqaOd_hRnRGvfWUF0Z13H_2hfTOW3ROOk0A8,254
|
|
18
|
-
onesecondtrader-0.
|
|
19
|
-
onesecondtrader-0.
|
|
20
|
-
onesecondtrader-0.
|
|
21
|
-
onesecondtrader-0.
|
|
19
|
+
onesecondtrader-0.30.0.dist-info/METADATA,sha256=WBtjr3Eh-kk7ZK4Q7MCF9Dv_UDhJgbGAeMeW_8il5FI,9682
|
|
20
|
+
onesecondtrader-0.30.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
21
|
+
onesecondtrader-0.30.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
22
|
+
onesecondtrader-0.30.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|