|
|
@@ -77,9 +77,6 @@ function filter(kLines, index) {
|
|
|
// 一共N天涨幅超过M%
|
|
|
if (statisticB(kLines, index) !== 0) return false
|
|
|
|
|
|
- // 前一根k线是阴线,并且收了影线,影线涨幅>=实体跌幅*0.732
|
|
|
- if (statisticD(kLines, index) === 0) return false
|
|
|
-
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
@@ -211,7 +208,7 @@ async function main() {
|
|
|
|
|
|
const FIRST_FEW_DAYS = 1 // 第几天的数据,0表示今天,1表示昨天,2表示前天,以此类推
|
|
|
const BUY_LIMIT_RATE = 0 // 从什么比例入场
|
|
|
- const BAKE_TEST_DAYS = 360 // 一共回测多少天, 150天是熊市最没有交易量的时候
|
|
|
+ const BAKE_TEST_DAYS = 30 // 一共回测多少天, 150天是熊市最没有交易量的时候
|
|
|
|
|
|
|
|
|
let btcKLines = kLinesMap['BTC_USDT']
|
|
|
@@ -255,7 +252,8 @@ async function main() {
|
|
|
|
|
|
logger.info(`${day_count}日(${dateStr}, ${realLength + fakeLength}只),赚钱榜(${realLength}只)利润${realDragonProfit}%`
|
|
|
+ `,亏钱榜(${fakeLength}只)利润${fakeDragonProfit}%`
|
|
|
- + `,赚钱榜期望利润${expRealProfit}%,亏钱榜期望利润${expFakeProfit}%,综合利润${synProfit}%,平均每只利润${avgProfit}%,BTC涨幅${btcUpRate}%`
|
|
|
+ + `,赚钱榜期望利润${expRealProfit}%,亏钱榜期望利润${expFakeProfit}%,综合利润${synProfit}%,平均每只利润${avgProfit}%`
|
|
|
+ + `,BTC涨幅${btcUpRate}%`
|
|
|
)
|
|
|
|
|
|
totalProfit += avgProfit
|