mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 02:53:50 +00:00
bollmaker: upgrade bollmaker exits methods
This commit is contained in:
parent
6ae0620730
commit
c3b6cb80c3
|
@ -17,7 +17,7 @@ backtest:
|
||||||
# see here for more details
|
# see here for more details
|
||||||
# https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
|
# https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
|
||||||
startTime: "2022-01-01"
|
startTime: "2022-01-01"
|
||||||
endTime: "2022-05-12"
|
endTime: "2022-07-18"
|
||||||
sessions:
|
sessions:
|
||||||
- binance
|
- binance
|
||||||
symbols:
|
symbols:
|
||||||
|
@ -133,28 +133,24 @@ exchangeStrategies:
|
||||||
# buyBelowNeutralSMA: when this set, it will only place buy order when the current price is below the SMA line.
|
# buyBelowNeutralSMA: when this set, it will only place buy order when the current price is below the SMA line.
|
||||||
buyBelowNeutralSMA: false
|
buyBelowNeutralSMA: false
|
||||||
|
|
||||||
# Set up your stop order, this is optional
|
exits:
|
||||||
# sometimes the stop order might decrease your total profit.
|
|
||||||
# you can setup multiple stop,
|
|
||||||
stops:
|
|
||||||
# use trailing stop order
|
|
||||||
- trailingStop:
|
|
||||||
# callbackRate: when the price reaches -1% from the previous highest, we trigger the stop
|
|
||||||
callbackRate: 5.1%
|
|
||||||
|
|
||||||
# closePosition is how much position do you want to close
|
# roiTakeProfit is used to force taking profit by percentage of the position ROI (currently the price change)
|
||||||
closePosition: 20%
|
# force to take the profit ROI exceeded the percentage.
|
||||||
|
- roiTakeProfit:
|
||||||
|
percentage: 3%
|
||||||
|
|
||||||
# minProfit is how much profit you want to take.
|
- protectiveStopLoss:
|
||||||
# if you set this option, your stop will only be triggered above the average cost.
|
activationRatio: 1%
|
||||||
minProfit: 5%
|
stopLossRatio: 0.2%
|
||||||
|
placeStopOrder: false
|
||||||
|
|
||||||
# interval is the time interval for checking your stop
|
- protectiveStopLoss:
|
||||||
interval: 1m
|
activationRatio: 2%
|
||||||
|
stopLossRatio: 1%
|
||||||
# virtual means we don't place a a REAL stop order
|
placeStopOrder: false
|
||||||
# when virtual is on
|
|
||||||
# the strategy won't place a REAL stop order, instead if watches the close price,
|
|
||||||
# and if the condition matches, it submits a market order to close your position.
|
|
||||||
virtual: true
|
|
||||||
|
|
||||||
|
- protectiveStopLoss:
|
||||||
|
activationRatio: 5%
|
||||||
|
stopLossRatio: 3%
|
||||||
|
placeStopOrder: false
|
||||||
|
|
|
@ -56,8 +56,7 @@ type Strategy struct {
|
||||||
// Symbol is the market symbol you want to trade
|
// Symbol is the market symbol you want to trade
|
||||||
Symbol string `json:"symbol"`
|
Symbol string `json:"symbol"`
|
||||||
|
|
||||||
// Interval is how long do you want to update your order price and quantity
|
types.IntervalWindow
|
||||||
Interval types.Interval `json:"interval"`
|
|
||||||
|
|
||||||
bbgo.QuantityOrAmount
|
bbgo.QuantityOrAmount
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user