mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
BUGFIX: GateIO candle retrieval, backtester formatting (#715)
* Fixes gateio candle retrieval. Fixes backtester exch & currency lookups * Fixes strat whoopsie * Using a helper function instead * shadowy lint figures defeated * Fixes fodmap typo Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -135,6 +135,15 @@ func NewFromConfig(cfg *config.Config, templatePath, output string, bot *engine.
|
||||
cfg.CurrencySettings[i].Base+cfg.CurrencySettings[i].Quote,
|
||||
err)
|
||||
}
|
||||
exch := bot.ExchangeManager.GetExchangeByName(cfg.CurrencySettings[i].ExchangeName)
|
||||
b := exch.GetBase()
|
||||
var pFmt currency.PairFormat
|
||||
pFmt, err = b.GetPairFormat(a, true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not format currency %v, %w", curr, err)
|
||||
}
|
||||
curr = curr.Format(pFmt.Delimiter, pFmt.Uppercase)
|
||||
|
||||
portfolioRisk.CurrencySettings[cfg.CurrencySettings[i].ExchangeName][a][curr] = &risk.CurrencySettings{
|
||||
MaximumOrdersWithLeverageRatio: cfg.CurrencySettings[i].Leverage.MaximumOrdersWithLeverageRatio,
|
||||
MaxLeverageRate: cfg.CurrencySettings[i].Leverage.MaximumLeverageRate,
|
||||
|
||||
Reference in New Issue
Block a user