Working on trading and backtesting loop

This commit is contained in:
Luke I. Wilson
2023-05-15 19:52:40 -05:00
parent b467d03c73
commit 9b6f7962f2
5 changed files with 191 additions and 54 deletions

View File

@@ -57,6 +57,8 @@ type Broker interface {
Candles(symbol string, frequency string, count int) (*DataFrame, error)
MarketOrder(symbol string, units float64, stopLoss, takeProfit float64) (Order, error)
NAV() float64 // NAV returns the net asset value of the account.
OpenOrders() []Order
OpenPositions() []Position
// Orders returns a slice of orders that have been placed with the broker. If an order has been canceled or
// filled, it will not be returned.
Orders() []Order