Skip to content

Add support for more OHLC Intervals #26

@github-actions

Description

@github-actions

Add support for more OHLC Intervals

// 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions