|
@@ -30,38 +30,7 @@ const (
|
|
)
|
|
)
|
|
|
|
|
|
type BaseStrategy struct {
|
|
type BaseStrategy struct {
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) Name() string {
|
|
|
|
- panic("implement me")
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) Model() string {
|
|
|
|
- panic("implement me")
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) MarketId() string {
|
|
|
|
- return "alpaca"
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) PositionSymbols() map[Side]string {
|
|
|
|
- return nil
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) PositionProbabilities() map[Side]float64 {
|
|
|
|
- return nil
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) Interval() uint8 {
|
|
|
|
- return 5
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) Cooldown(periods uint8) time.Duration {
|
|
|
|
- return time.Minute * time.Duration(strategy.Interval()*periods)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func (strategy BaseStrategy) Handle(market Market, probability Probability) error {
|
|
|
|
- return nil
|
|
|
|
|
|
+ Strategy
|
|
}
|
|
}
|
|
|
|
|
|
func (strategy BaseStrategy) Symbols() []string {
|
|
func (strategy BaseStrategy) Symbols() []string {
|