Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for more OHLC Intervals #26

Open
github-actions bot opened this issue Feb 27, 2021 · 0 comments
Open

Add support for more OHLC Intervals #26

github-actions bot opened this issue Feb 27, 2021 · 0 comments
Labels

Comments

@github-actions
Copy link

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

@github-actions github-actions bot added the todo label Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

0 participants