onesecondtrader 0.29.0__tar.gz → 0.30.0__tar.gz

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.
Files changed (23) hide show
  1. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/PKG-INFO +1 -1
  2. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/pyproject.toml +1 -1
  3. onesecondtrader-0.30.0/src/onesecondtrader/indicators/__init__.py +11 -0
  4. onesecondtrader-0.30.0/src/onesecondtrader/indicators/bar.py +47 -0
  5. onesecondtrader-0.29.0/src/onesecondtrader/indicators/__init__.py +0 -5
  6. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/LICENSE +0 -0
  7. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/README.md +0 -0
  8. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/__init__.py +0 -0
  9. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/brokers/__init__.py +0 -0
  10. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/brokers/base.py +0 -0
  11. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/brokers/simulated.py +0 -0
  12. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/events/__init__.py +0 -0
  13. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/events/bases.py +0 -0
  14. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/events/market.py +0 -0
  15. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/events/requests.py +0 -0
  16. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/events/responses.py +0 -0
  17. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/indicators/base.py +0 -0
  18. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/messaging/__init__.py +0 -0
  19. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/messaging/eventbus.py +0 -0
  20. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/messaging/subscriber.py +0 -0
  21. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/models/__init__.py +0 -0
  22. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/models/data.py +0 -0
  23. {onesecondtrader-0.29.0 → onesecondtrader-0.30.0}/src/onesecondtrader/models/orders.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: onesecondtrader
3
- Version: 0.29.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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "onesecondtrader"
3
- version = "0.29.0"
3
+ version = "0.30.0"
4
4
  description = "The Trading Infrastructure Toolkit for Python. Research, simulate, and deploy algorithmic trading strategies — all in one place."
5
5
  authors = [
6
6
  {name = "Nils P. Kujath",email = "63961429+NilsKujath@users.noreply.github.com"}
@@ -0,0 +1,11 @@
1
+ __all__ = [
2
+ "Indicator",
3
+ "Open",
4
+ "High",
5
+ "Low",
6
+ "Close",
7
+ "Volume",
8
+ ]
9
+
10
+ from .base import Indicator
11
+ from .bar import Open, High, Low, Close, Volume
@@ -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,5 +0,0 @@
1
- __all__ = [
2
- "Indicator",
3
- ]
4
-
5
- from .base import Indicator