You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -99,36 +99,118 @@ The [documentation](https://coding-kitties.github.io/investing-algorithm-framewo
99
99
The framework is designed around the `TradingStrategy` class. You define **what data** your strategy needs and **when to buy or sell** — the framework handles execution, position management, and reporting.
100
100
101
101
```python
102
+
from typing import Dict, Any
103
+
104
+
import pandas as pd
105
+
from pyindicators import ema, rsi, crossover, crossunder
106
+
102
107
from investing_algorithm_framework import (
103
-
TradingStrategy, TimeUnit, Context, OrderSide
108
+
TradingStrategy, DataSource, TimeUnit, DataType,
109
+
PositionSize, ScalingRule, StopLossRule,
104
110
)
105
111
106
-
classMyStrategy(TradingStrategy):
112
+
113
+
classRSIEMACrossoverStrategy(TradingStrategy):
114
+
"""
115
+
EMA crossover + RSI filter strategy with position scaling and stop losses.
116
+
117
+
Buy when RSI is oversold AND a recent EMA crossover occurred.
118
+
Sell when RSI is overbought AND a recent EMA crossunder occurred.
119
+
Scale into winners, trail a stop loss, and let the framework handle the rest.
Create as many strategy variants as you want — different parameters, different indicators, different symbols — then backtest them all and compare in a single report.
0 commit comments