eventholder

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 1 Imported by: 0

README

GoCryptoTrader Backtester: Eventholder package

Build Status Software License GoDoc Coverage Status Go Report Card

This eventholder 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 this Trello board: https://trello.com/b/ZAhMhpOy/gocryptotrader.

Join our slack to discuss all things related to GoCryptoTrader! GoCryptoTrader Slack

Eventholder package overview

The event holder is a simple interface implementation which allows the backtester to iterate over the event queue. The event holder is based on the EventHolder interface and is implemented by Holder. It is used by backtest.Backtester and it accepts appending any struct which implements the common.EventHandler interface, eg order.Order

Please click GoDocs chevron above to view current GoDoc information for this package

Contribution

Please feel free to submit any pull requests or suggest any desired features to be added.

When submitting a PR, please abide by our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Code must adhere to our coding style.
  • Pull requests need to be based on and opened against the master branch.

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHolder

type EventHolder interface {
	Reset()
	AppendEvent(common.EventHandler)
	NextEvent() common.EventHandler
}

EventHolder interface details what is expected of an event holder to perform

type Holder

type Holder struct {
	Queue []common.EventHandler
}

Holder contains the event queue for backtester processing

func (*Holder) AppendEvent

func (e *Holder) AppendEvent(i common.EventHandler)

AppendEvent adds and event to the queue

func (*Holder) NextEvent

func (e *Holder) NextEvent() (i common.EventHandler)

NextEvent removes the current event and returns the next event in the queue

func (*Holder) Reset

func (e *Holder) Reset()

Reset returns struct to defaults

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL