mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
fix lastRecordTime
Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
parent
25fb684fd1
commit
0715437cc5
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user