feat: implement autonomous Bybit demo trading agent
This commit is contained in:
15
tests/test_market.py
Normal file
15
tests/test_market.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from decimal import Decimal
|
||||
|
||||
from llm_trade_bot.market import technical_indicators
|
||||
|
||||
|
||||
def test_indicators_are_computed_for_sufficient_history():
|
||||
closes = [Decimal(index) for index in range(1, 61)]
|
||||
highs = [value + 1 for value in closes]
|
||||
lows = [value - 1 for value in closes]
|
||||
volumes = [Decimal(100) for _ in closes]
|
||||
result = technical_indicators(closes, highs, lows, volumes)
|
||||
assert result["ema_20"] is not None
|
||||
assert result["ema_50"] is not None
|
||||
assert result["rsi_14"] == 100
|
||||
assert result["atr_14"] is not None
|
||||
Reference in New Issue
Block a user