-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Add support for more OHLC Intervals
sats-stacker/exchange/kraken.go
Line 92 in 7ab02f2
// TODO Add support for more OHLC Intervals |
}
// Calculate a price modifier based on the Gap between current price and Highest price in a given time
func (k *Kraken) priceModifierBasedOnGapFromHighPrice(c *cli.Context) (float64, error) {
var OHLCInterval string
switch c.Int64("high-price-days-modifier") {
// TODO Add support for more OHLC Intervals
case 7:
// 15 interval will give a week worth of data
OHLCInterval = "15"
default:
// 15 interval will give a week worth of data
OHLCInterval = "15"
}
ohlcs, err := k.Api.OHLCWithInterval(k.Pair, OHLCInterval)
if err != nil {
return 0.0, fmt.Errorf("Failed to get OHLC Data for pair %s: %s", k.Pair, err)
}
a0ef830e8417a5f4b4eb9f394c698f76d101704a