Documentation ¶
Index ¶
- func CreateBollingerStochStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
- func CreateEMAStochATRStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy, atr techan.Indicator)
- func CreateEMAStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
- func CreateIchimokuStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
- func CreateMACDStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
- func NewBaseLineIndicator(series *techan.TimeSeries, window int) techan.Indicator
- func NewConversionLineIndicator(series *techan.TimeSeries, window int) techan.Indicator
- func NewDispositionIndicator(indicator techan.Indicator, disposition int) techan.Indicator
- func NewFastStochasticIndicator(closePrice techan.Indicator, series *techan.TimeSeries, timeframe int) techan.Indicator
- func NewLaggingSpanIndicator(series *techan.TimeSeries) techan.Indicator
- func NewLeadingSpanAIndicator(c conversionLineIndicator, b baseLineIndicator) techan.Indicator
- func NewLeadingSpanBIndicator(series *techan.TimeSeries, window int) techan.Indicator
- func NewMinimumIndicator(ind1, ind2 techan.Indicator) techan.Indicator
- type AverageLossAnalysis
- type AverageWinAnalysis
- type CommissionAnalysis
- type DynamicStrategyFunc
- type FalseRule
- type LogTradesAnalysis
- type LoseStreakAnalysis
- type MaxLossAnalysis
- type MaxWinAnalysis
- type OpenPLAnalysis
- type ProfitableTradesAnalysis
- type Report
- type StochasticRSI
- type TotalProfitAnalysis
- type Watchdog
- type WinStreakAnalysis
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBollingerStochStrategy ¶
func CreateBollingerStochStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
func CreateEMAStochATRStrategy ¶
func CreateEMAStochATRStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy, atr techan.Indicator)
func CreateEMAStrategy ¶
func CreateEMAStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
func CreateIchimokuStrategy ¶
func CreateIchimokuStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
func CreateMACDStrategy ¶
func CreateMACDStrategy(series *techan.TimeSeries) (long, short techan.RuleStrategy)
func NewBaseLineIndicator ¶
func NewBaseLineIndicator(series *techan.TimeSeries, window int) techan.Indicator
func NewConversionLineIndicator ¶
func NewConversionLineIndicator(series *techan.TimeSeries, window int) techan.Indicator
func NewDispositionIndicator ¶
func NewLaggingSpanIndicator ¶
func NewLaggingSpanIndicator(series *techan.TimeSeries) techan.Indicator
func NewLeadingSpanBIndicator ¶
func NewLeadingSpanBIndicator(series *techan.TimeSeries, window int) techan.Indicator
Types ¶
type AverageLossAnalysis ¶
type AverageLossAnalysis struct{}
func (AverageLossAnalysis) Analyze ¶
func (a AverageLossAnalysis) Analyze(record *techan.TradingRecord) float64
type AverageWinAnalysis ¶
type AverageWinAnalysis struct{}
func (AverageWinAnalysis) Analyze ¶
func (a AverageWinAnalysis) Analyze(record *techan.TradingRecord) float64
type CommissionAnalysis ¶
type CommissionAnalysis struct {
Commission float64
}
func (CommissionAnalysis) Analyze ¶
func (ca CommissionAnalysis) Analyze(record *techan.TradingRecord) float64
Analyze analyzes the trading record for the total commission cost.
type DynamicStrategyFunc ¶
type DynamicStrategyFunc func(*techan.TimeSeries) (long, short techan.RuleStrategy)
type FalseRule ¶
type FalseRule struct{}
func (FalseRule) IsSatisfied ¶
func (r FalseRule) IsSatisfied(_ int, _ *techan.TradingRecord) bool
type LogTradesAnalysis ¶
LogTradesAnalysis is a wrapper around an io.Writer, which logs every trade executed to that writer
func (LogTradesAnalysis) Analyze ¶
func (lta LogTradesAnalysis) Analyze(record *techan.TradingRecord) float64
Analyze logs trades to provided io.Writer
type LoseStreakAnalysis ¶
type LoseStreakAnalysis struct{}
func (LoseStreakAnalysis) Analyze ¶
func (l LoseStreakAnalysis) Analyze(record *techan.TradingRecord) float64
type MaxLossAnalysis ¶
type MaxLossAnalysis struct{}
func (MaxLossAnalysis) Analyze ¶
func (m MaxLossAnalysis) Analyze(record *techan.TradingRecord) float64
type MaxWinAnalysis ¶
type MaxWinAnalysis struct{}
func (MaxWinAnalysis) Analyze ¶
func (m MaxWinAnalysis) Analyze(record *techan.TradingRecord) float64
type OpenPLAnalysis ¶
func (OpenPLAnalysis) Analyze ¶
func (o OpenPLAnalysis) Analyze(record *techan.TradingRecord) float64
type ProfitableTradesAnalysis ¶
type ProfitableTradesAnalysis struct {
Commission float64
}
ProfitableTradesAnalysis analyzes the trading record for the number of profitable trades
func (ProfitableTradesAnalysis) Analyze ¶
func (pta ProfitableTradesAnalysis) Analyze(record *techan.TradingRecord) float64
Analyze returns the number of profitable trades in a trading record
type StochasticRSI ¶
func NewStochasticRSI ¶
func NewStochasticRSI(series *techan.TimeSeries, window int) StochasticRSI
type TotalProfitAnalysis ¶
type TotalProfitAnalysis struct {
Commission float64
}
TotalProfitAnalysis analyzes the trading record for total profit.
func (TotalProfitAnalysis) Analyze ¶
func (tps TotalProfitAnalysis) Analyze(record *techan.TradingRecord) float64
Analyze analyzes the trading record for total profit.
type Watchdog ¶
type Watchdog struct { Symbol string Interval string Risk float64 Commission float64 Leverage int Demo bool SymbolInfo binance.Symbol StopC chan struct{} InterruptCh chan os.Signal // contains filtered or unexported fields }
func (Watchdog) MarshalJSON ¶
type WinStreakAnalysis ¶
type WinStreakAnalysis struct{}
func (WinStreakAnalysis) Analyze ¶
func (w WinStreakAnalysis) Analyze(record *techan.TradingRecord) float64
Click to show internal directories.
Click to hide internal directories.