Browse Source

Ironing things in preparation for merge request

master
Barthélemy Paléologue 8 months ago
parent
commit
d09a21b7c8
  1. 2
      auto_trading/indicators/slopy.py
  2. 2
      auto_trading/indicators/sma.py
  3. 4
      auto_trading/strat/buyupselldown.py
  4. 2
      auto_trading/strat/hold.py

2
auto_trading/indicators/slopy.py

@ -1,4 +1,4 @@
"""Dumb indicator, for testing purposes."""
"""+1 when going up, -1 when going down, 0 when not moving enough."""
from calendar import c
from re import sub
import pandas as pd # type: ignore

2
auto_trading/indicators/sma.py

@ -1,4 +1,4 @@
"""SMA indicator, for testing purposes."""
"""SMA indicator, not ready yet."""
from calendar import c
from re import sub
import pandas as pd # type: ignore

4
auto_trading/strat/buyupselldown.py

@ -7,7 +7,7 @@ from ..interfaces import Indicator, Strategy, Order, PTFState
class BuyUpSellDown(Strategy):
"""Just hold some stock."""
"""Buy when indicators are green, sell when red."""
def __init__(self, indicators: Dict[str, Indicator]):
"""Init the class"""
@ -71,4 +71,4 @@ class BuyUpSellDown(Strategy):
)
)
print(state.stocks)
return orders # type: ignore
return orders

2
auto_trading/strat/hold.py

@ -3,7 +3,7 @@ from typing import List
import pandas as pd # type: ignore
from ..orders import Long
from ..interfaces import Indicator, Strategy, Order, PTFState
from ..interfaces import Strategy, Order, PTFState
class Hold(Strategy):

Loading…
Cancel
Save