fix lastRecordTime

Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
c9s 2022-06-26 13:23:04 +08:00
parent 25fb684fd1
commit 0715437cc5
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 6 additions and 2 deletions

View File

@ -21,7 +21,7 @@ exchangeStrategies:
# breakLow settings are used for shorting when the current price break the previous low
breakLow:
# ratio is how much the price breaks the previous low to trigger the short.
ratio: 0.1%
ratio: -0.1%
# quantity is used for submitting the sell order
# if quantity is not set, all base balance will be used for selling the short.
@ -71,6 +71,10 @@ exchangeStrategies:
# roiMinTakeProfitPercentage applies to lowerShadowRatio and cumulatedVolume exit options
roiMinTakeProfitPercentage: 10%
roiProtectionStopLoss:
activationRatio: 1%
stopLossRatio: 0.2%
# lowerShadowRatio is used to taking profit when the (lower shadow height / low price) > lowerShadowRatio
# you can grab a simple stats by the following SQL:
# SELECT ((close - low) / close) AS shadow_ratio FROM binance_klines WHERE symbol = 'ETHUSDT' AND `interval` = '5m' AND start_time > '2022-01-01' ORDER BY shadow_ratio DESC LIMIT 20;

View File

@ -176,7 +176,7 @@ func lastRecordTime(sel SyncTask, recordSlice reflect.Value, defaultTime time.Ti
length := recordSlice.Len()
if length > 0 {
last := recordSlice.Index(length - 1)
since = sel.Time(last)
since = sel.Time(last.Interface())
}
return since