mirror of
https://github.com/lukewilson2002/autotrader.git
synced 2025-08-02 21:19:33 +00:00
Slippage and more statistics
This commit is contained in:
@@ -90,6 +90,7 @@ func TestBacktestingBrokerFunctions(t *testing.T) {
|
||||
func TestBacktestingBrokerOrders(t *testing.T) {
|
||||
data := newTestingDataframe()
|
||||
broker := NewTestBroker(nil, data, 100_000, 50, 0, 0)
|
||||
broker.Slippage = 0
|
||||
|
||||
timeBeforeOrder := time.Now()
|
||||
order, err := broker.MarketOrder("EUR_USD", 50_000, 0, 0) // Buy 50,000 USD for 1000 EUR with no stop loss or take profit
|
||||
|
Reference in New Issue
Block a user