Documentation ¶
Index ¶
- type BinancePaperTrader
- func (pt *BinancePaperTrader) Close(id string, exit float64, closeCandle *trade_knife.Candle)
- func (pt *BinancePaperTrader) CloseWatcher()
- func (pt *BinancePaperTrader) EntryWatcher()
- func (pt *BinancePaperTrader) ExitWatcher()
- func (pt *BinancePaperTrader) Open(currency goex.CurrencyPair, position trade_knife.PositionType, ...) *trade_knife.Trade
- func (pt *BinancePaperTrader) Start() trade_knife.TradeError
- type Okex
- func (ok *Okex) Close(id, exit float64, closeCandle *trade_knife.Candle)
- func (ok *Okex) CloseWatcher()
- func (ok *Okex) EntryWatcher()
- func (ok *Okex) ExitWatcher()
- func (ok *Okex) Open(id string, currency goex.CurrencyPair, position trade_knife.PositionType, ...) *trade_knife.Trade
- func (ok *Okex) Start() trade_knife.TradeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinancePaperTrader ¶
type BinancePaperTrader struct { Trades trade_knife.Trades Wallet float64 BuyScoreTrigger float64 SellScoreTrigger float64 CloseOnOpposite bool Cross bool Debug bool ActiveTrade *trade_knife.Trade // contains filtered or unexported fields }
BinancePaperTrader is a Binance-Exchange-PaperTrader trade_knife.Trader
func NewBinancePaperTrader ¶
func NewBinancePaperTrader(candleChannel trade_knife.CandleChannel, entryChannel trade_knife.EnterChannel, exitChannel trade_knife.ExitChannel, openTrades trade_knife.TradesChannel, doneTrades trade_knife.TradesChannel, wallet, buyScoreTrigger, sellScoreTrigger float64, closeOnOpposite, cross, debug bool, logger trade_knife.Logger) *BinancePaperTrader
NewBinancePaperTrader returns a pointer to fresh BinancePaperTrader's trade_knife.Trader.
func (*BinancePaperTrader) Close ¶
func (pt *BinancePaperTrader) Close(id string, exit float64, closeCandle *trade_knife.Candle)
Close closes the chosen trade
func (*BinancePaperTrader) CloseWatcher ¶
func (pt *BinancePaperTrader) CloseWatcher()
CloseWatcher watches for close signals and close the trade immediately.
func (*BinancePaperTrader) EntryWatcher ¶
func (pt *BinancePaperTrader) EntryWatcher()
EntryWatcher watches for entry signals and open proper positions.
func (*BinancePaperTrader) ExitWatcher ¶
func (pt *BinancePaperTrader) ExitWatcher()
ExitWatcher watches for exit signals and fire proper close signals.
func (*BinancePaperTrader) Open ¶
func (pt *BinancePaperTrader) Open(currency goex.CurrencyPair, position trade_knife.PositionType, quote, entry, sl, tp float64, openCandle *trade_knife.Candle) *trade_knife.Trade
Open creates a new trade immediately.
func (*BinancePaperTrader) Start ¶
func (pt *BinancePaperTrader) Start() trade_knife.TradeError
Start launches all watchers of the driver.
type Okex ¶
type Okex struct { Trades trade_knife.Trades ActiveTrade *trade_knife.Trade Lever float64 BuyScoreTrigger float64 SellScoreTrigger float64 CloseOnOpposite bool Cross bool Debug bool Market trade_knife.MarketType Api *okex.OKExSwap // contains filtered or unexported fields }
Okex is an Okay-Exchange trade_knife.Trader
func NewOkex ¶
func NewOkex(apiKey, secretKey, passphrase string, candleChannel trade_knife.CandleChannel, entryChannel trade_knife.EnterChannel, exitChannel trade_knife.ExitChannel, openTrades trade_knife.TradesChannel, doneTrades trade_knife.TradesChannel, lever, buyScoreTrigger, sellScoreTrigger float64, closeOnOpposite, cross, debug bool, logger *trade_knife.Logger) *Okex
NewOkex returns a pointer to a fresh Okex's trade_knife.Trader.
func (*Okex) CloseWatcher ¶
func (ok *Okex) CloseWatcher()
func (*Okex) EntryWatcher ¶
func (ok *Okex) EntryWatcher()
func (*Okex) ExitWatcher ¶
func (ok *Okex) ExitWatcher()
Click to show internal directories.
Click to hide internal directories.