How tradegunlugum/discretionary-backtester works
This is a small discretionary-trading backtester. Its demonstrated workflow loads dated price bars, selects a bar for a position, derives stop-loss and take-profit levels, then scans later bars for an exit. The README describes win-rate calculation, but the sampled implementation prints exit outcomes and does not show a win-rate summary. The graph reflects the shown entry point and core runtime; it does not assume unsampled behavior.
Main entry points: main.py Backtest entry · TradeInfoManager.py Bar loading and exit scan · Position.py Position setup · PositionManager.py Position collection
Components 7
Backtest runtime
- Backtest entry
main.py - Position setup
Position.py - Position collection
PositionManager.py - Bar loading and exit scan
TradeInfoManager.py
Market data
- Bar parsing
TradeInfo.py - EURUSD bars
EURUSD_5min_sample.txt
Other components
- Strategy user
Connections 10
- Strategy user → Backtest entry: runs backtest
README.md - Backtest entry → Bar loading and exit scan: loads bars
main.py - Bar loading and exit scan → EURUSD bars: reads bars
TradeInfoManager.py - Bar loading and exit scan → Bar parsing: parses rows
TradeInfoManager.py - Backtest entry → Bar loading and exit scan: looks up bar
main.py - Backtest entry → Position setup: builds position
main.py - Backtest entry → Position collection: creates collection
main.py - Backtest entry → Position collection: starts trades
main.py - Bar loading and exit scan → Position setup: checks levels
TradeInfoManager.py - Position setup → Bar parsing: uses entry bar
main.py