mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
* codebase: Remove web frontend and related services * refactor: Update StartPPROF to accept context and adjust related tests * refactor: Simplify SetIfZero functions and update related tests * config: Clarify DowngradeConfig method documentation regarding permanent removal of deprecated fields * refactor: Rename setIfZeroAndWarn to setDefaultIfZeroWarn for clarity and update related calls * refactor: Update error handling in DataHistoryManager and remove redundant error variable
2.6 KiB
2.6 KiB
GoCryptoTrader Backtester: Slippage package
This slippage package is part of the GoCryptoTrader codebase.
This is still in active development
You can track ideas, planned features and what's in progress on our GoCryptoTrader Kanban board.
Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack
Slippage package overview
Slippage refers to the difference between the expected price of a trade and the price at which the trade is executed. Slippage is used here to simulate what would occur if trading was live as no perfect conditions exist for placing orders. Slippage is calculated in two ways in the GoCryptoTrader Backtester
If RealOrders is true
- The orderbook is frequently requested during live cycle candle retrieval
- When the order is being calculated in the
ExecuteOrdereventhandler, it will use the orderbook to simulate placing the order and adjust the order price
If RealOrders is false
- The
min-slippage-percentandmax-slippage-percentvalues for the specific exchange, asset and currency pair will be used as bounds to simulate an orderbook using a random number- If it is a buy order, it will raise the price by a random percentage between the two values
- If the order is a sell order, it will reduce the price by a random percentage between the two values
Donations
If this framework helped you in any way, or you would like to support the developers working on it, please donate Bitcoin to:
bc1qk0jareu4jytc0cfrhr5wgshsq8282awpavfahc