From 279bb66a4ddcc130e16b374f83949c5642913b8d Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 26 Jun 2022 19:20:08 +0800 Subject: [PATCH] update config structure --- config/pivotshort-ETHUSDT.yaml | 36 +++++++++++++++----------------- config/pivotshort-GMTBUSD.yaml | 30 ++++++++++++++++++++++----- config/pivotshort.yaml | 38 ++++++++++++++++++---------------- 3 files changed, 62 insertions(+), 42 deletions(-) diff --git a/config/pivotshort-ETHUSDT.yaml b/config/pivotshort-ETHUSDT.yaml index ccf28ee81..2059c8040 100644 --- a/config/pivotshort-ETHUSDT.yaml +++ b/config/pivotshort-ETHUSDT.yaml @@ -60,34 +60,32 @@ exchangeStrategies: numOfLayers: 1 layerSpread: 0.1% - exit: - # roiStopLossPercentage is the stop loss percentage of the position ROI (currently the price change) - roiStopLossPercentage: 2% + exits: + # roiStopLoss is the stop loss percentage of the position ROI (currently the price change) + - roiStopLoss: + percentage: 2% - # roiTakeProfitPercentage is used to force taking profit by percentage of the position ROI (currently the price change) - # force to take the profit ROI exceeded the percentage. - roiTakeProfitPercentage: 30% + # roiTakeProfit is used to force taking profit by percentage of the position ROI (currently the price change) + # force to take the profit ROI exceeded the percentage. + - roiTakeProfit: + percentage: 30% - # roiMinTakeProfitPercentage applies to lowerShadowRatio and cumulatedVolume exit options - roiMinTakeProfitPercentage: 10% - - roiProtectionStopLoss: + - protectionStopLoss: activationRatio: 1% stopLossRatio: 0.2% + placeStopOrder: true - # 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; - lowerShadowRatio: 3% + # lowerShadowTakeProfit 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; + - lowerShadowTakeProfit: + ratio: 3% - # cumulatedVolume is used to take profit when the cumulated quote volume from the klines exceeded a threshold - cumulatedVolume: - enabled: true + # cumulatedVolumeTakeProfit is used to take profit when the cumulated quote volume from the klines exceeded a threshold + - cumulatedVolumeTakeProfit: minQuoteVolume: 90_000_000 window: 5 - marginOrderSideEffect: repay - backtest: sessions: - binance diff --git a/config/pivotshort-GMTBUSD.yaml b/config/pivotshort-GMTBUSD.yaml index 0e3fa7724..e99dab685 100644 --- a/config/pivotshort-GMTBUSD.yaml +++ b/config/pivotshort-GMTBUSD.yaml @@ -22,11 +22,31 @@ exchangeStrategies: numLayers: 3 marginOrderSideEffect: borrow - exit: - takeProfitPercentage: 13% - stopLossPercentage: 0.5% - shadowTakeProfitRatio: 3% - marginOrderSideEffect: repay + exits: + # roiStopLoss is the stop loss percentage of the position ROI (currently the price change) + - roiStopLoss: + percentage: 2% + + # roiTakeProfit is used to force taking profit by percentage of the position ROI (currently the price change) + # force to take the profit ROI exceeded the percentage. + - roiTakeProfit: + percentage: 30% + + - protectionStopLoss: + activationRatio: 1% + stopLossRatio: 0.2% + placeStopOrder: true + + # lowerShadowTakeProfit 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; + - lowerShadowTakeProfit: + ratio: 3% + + # cumulatedVolumeTakeProfit is used to take profit when the cumulated quote volume from the klines exceeded a threshold + - cumulatedVolumeTakeProfit: + minQuoteVolume: 90_000_000 + window: 5 backtest: diff --git a/config/pivotshort.yaml b/config/pivotshort.yaml index ec80ca351..48b0cdc70 100644 --- a/config/pivotshort.yaml +++ b/config/pivotshort.yaml @@ -25,31 +25,33 @@ exchangeStrategies: interval: 1h window: 99 - exit: - # roiStopLossPercentage is the stop loss percentage of the position ROI (currently the price change) - roiStopLossPercentage: 1% + exits: + # roiStopLoss is the stop loss percentage of the position ROI (currently the price change) + - roiStopLoss: + percentage: 2% - # roiTakeProfitPercentage is the take profit percentage of the position ROI (currently the price change) - # force to take the profit ROI exceeded the percentage. - roiTakeProfitPercentage: 25% + # roiTakeProfit is used to force taking profit by percentage of the position ROI (currently the price change) + # force to take the profit ROI exceeded the percentage. + - roiTakeProfit: + percentage: 30% - # roiMinTakeProfitPercentage applies to lowerShadowRatio and cumulatedVolume exit options - roiMinTakeProfitPercentage: 10% + - protectionStopLoss: + activationRatio: 1% + stopLossRatio: 0.2% + placeStopOrder: true - # lowerShadowRatio is used to force 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; - lowerShadowRatio: 3% + # lowerShadowTakeProfit 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; + - lowerShadowTakeProfit: + ratio: 3% - # cumulatedVolume is used to take profit when the cumulated quote volume from the klines exceeded a threshold - cumulatedVolume: - enabled: false + # cumulatedVolumeTakeProfit is used to take profit when the cumulated quote volume from the klines exceeded a threshold + - cumulatedVolumeTakeProfit: minQuoteVolume: 90_000_000 window: 5 - marginOrderSideEffect: repay - - backtest: sessions: - binance