mirror of
https://github.com/lukewilson2002/autotrader.git
synced 2025-08-03 05:29:32 +00:00
Slippage and more statistics
This commit is contained in:
@@ -57,6 +57,8 @@ type Position interface {
|
||||
// - PositionClosed(Position) - Emitted after a position is closed either manually or automatically.
|
||||
type Broker interface {
|
||||
Signaler
|
||||
Bid(symbol string) float64 // Bid returns the sell price of the symbol.
|
||||
Ask(symbol string) float64 // Ask returns the buy price of the symbol, which is typically higher than the sell price.
|
||||
// Candles returns a dataframe of candles for the given symbol, frequency, and count by querying the broker.
|
||||
Candles(symbol, frequency string, count int) (*DataFrame, error)
|
||||
MarketOrder(symbol string, units, stopLoss, takeProfit float64) (Order, error)
|
||||
|
Reference in New Issue
Block a user