mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
add BidSpread and AskSpread
This commit is contained in:
parent
701e80d0d8
commit
2e7621ca55
|
@ -68,6 +68,12 @@ type Strategy struct {
|
||||||
// Spread can be set by percentage or floating number. e.g., 0.1% or 0.001
|
// Spread can be set by percentage or floating number. e.g., 0.1% or 0.001
|
||||||
Spread fixedpoint.Value `json:"spread"`
|
Spread fixedpoint.Value `json:"spread"`
|
||||||
|
|
||||||
|
// BidSpread overrides the spread setting, this spread will be used for the buy order
|
||||||
|
BidSpread fixedpoint.Value `json:"bidSpread,omitempty"`
|
||||||
|
|
||||||
|
// AskSpread overrides the spread setting, this spread will be used for the sell order
|
||||||
|
AskSpread fixedpoint.Value `json:"askSpread,omitempty"`
|
||||||
|
|
||||||
// MinProfitSpread is the minimal order price spread from the current average cost.
|
// MinProfitSpread is the minimal order price spread from the current average cost.
|
||||||
// For long position, you will only place sell order above the price (= average cost * (1 + minProfitSpread))
|
// For long position, you will only place sell order above the price (= average cost * (1 + minProfitSpread))
|
||||||
// For short position, you will only place buy order below the price (= average cost * (1 - minProfitSpread))
|
// For short position, you will only place buy order below the price (= average cost * (1 - minProfitSpread))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user