Files
gocryptotrader/backtester/engine
Mathieu Cesbron 60f7cb37f2 backtester/engine: Fix TestStart race (#2024)
* Fix TestStart race

TestStart does 3 tests
test1 = Start() with no error
test2 = Start() on an already started struct
test3 = Start() on nil

Previously, test1 and test2 were on the same struct. Depending on
the go scheduler, we could have test2 fail because the field "started"
could go from 1 to 0 just after the atomic compare and swap.
So we would Start() a second time on the same struct but the field "started"
would already be back to 0.

* Divide TestStart in 3 tests

* Resolve comments

---------

Co-authored-by: mathieu cesbron <mathieucesbron@mathieus-MacBook-Pro.local>
2025-09-05 17:26:30 +10:00
..

GoCryptoTrader Backtester: Engine package

Build Status Software License GoDoc Coverage Status Go Report Card

This engine 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

Engine package overview

The engine package is the most important package of the GoCryptoTrader backtester. It is the engine which combines all elements. It is responsible for the following functionality

  • Loading settings from a provided config file
  • Retrieving data
  • Loading the data into assessable chunks
  • Analysing the data via the handleEvent function
  • Looping through all data
  • Outputting results into a report

A flow of the application is as follows: workflow

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