Bitcoin favicon, more strategies, default timeframe 5m
CI/CD / backend (pull_request) Successful in 5m21s
CI/CD / frontend (pull_request) Successful in 5m4s
CI/CD / build (pull_request) Skipped
CI/CD / deploy (pull_request) Skipped
CI/CD / cleanup (pull_request) Skipped

- Add an SVG Bitcoin favicon and link it in index.html.
- New indicators: macd() and roc().
- Five new strategies: macd_trend, bollinger_reversion, donchian_breakout,
  ema_cross, momentum (plus the existing sma_cross, rsi_reversion).
- Default TIMEFRAME is now 5m (config, .env.example, compose, workflow, UI).
This commit is contained in:
matitos committed 2026-09-18 20:03:30 +00:00
1 parent 186a6949ee
commit c500fb7572
18 files changed
+488 -11

No files matched your search

+10 -1
View File
@@ -5,7 +5,7 @@ from collections.abc import Sequence
from dataclasses import dataclass
from typing import Any, ClassVar, Literal, Protocol
from app.engine.indicators import atr, ema, rolling_std, rsi, sma
from app.engine.indicators import atr, ema, macd, roc, rolling_std, rsi, sma
from app.models import PositionSide
from app.schemas import Candle, ParamSpec, StrategyOut
@@ -106,6 +106,15 @@ class StrategyContext:
def std(self, period: int = 20) -> float | None:
return rolling_std(self.closes, period)[-1]
def macd(
self, fast: int = 12, slow: int = 26, signal: int = 9
) -> tuple[float | None, float | None, float | None]:
macd_line, signal_line, histogram = macd(self.closes, fast, slow, signal)
return macd_line[-1], signal_line[-1], histogram[-1]
def roc(self, period: int = 10) -> float | None:
return roc(self.closes, period)[-1]
# --- order intents ------------------------------------------------
def enter_long(
self,