mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
remove config flag constrant
This commit is contained in:
parent
334e3a3940
commit
553fe3abf9
|
@ -77,7 +77,6 @@ var listOrdersCmd = &cobra.Command{
|
||||||
ValidArgs: []string{"", "open", "closed"},
|
ValidArgs: []string{"", "open", "closed"},
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
PreRunE: cobraInitRequired([]string{
|
PreRunE: cobraInitRequired([]string{
|
||||||
"config",
|
|
||||||
"session",
|
"session",
|
||||||
"symbol",
|
"symbol",
|
||||||
}),
|
}),
|
||||||
|
@ -148,7 +147,6 @@ var executeOrderCmd = &cobra.Command{
|
||||||
Short: "execute buy/sell on the balance/position you have on specific symbol",
|
Short: "execute buy/sell on the balance/position you have on specific symbol",
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
PreRunE: cobraInitRequired([]string{
|
PreRunE: cobraInitRequired([]string{
|
||||||
"config",
|
|
||||||
"symbol",
|
"symbol",
|
||||||
"side",
|
"side",
|
||||||
"target-quantity",
|
"target-quantity",
|
||||||
|
@ -299,7 +297,6 @@ var submitOrderCmd = &cobra.Command{
|
||||||
Short: "place order to the exchange",
|
Short: "place order to the exchange",
|
||||||
SilenceUsage: true,
|
SilenceUsage: true,
|
||||||
PreRunE: cobraInitRequired([]string{
|
PreRunE: cobraInitRequired([]string{
|
||||||
"config",
|
|
||||||
"session",
|
"session",
|
||||||
"symbol",
|
"symbol",
|
||||||
"side",
|
"side",
|
||||||
|
|
|
@ -230,6 +230,7 @@ func (s *ProfitStats) Init(market Market) {
|
||||||
func (s *ProfitStats) AddProfit(profit Profit) {
|
func (s *ProfitStats) AddProfit(profit Profit) {
|
||||||
s.AccumulatedPnL = s.AccumulatedPnL.Add(profit.Profit)
|
s.AccumulatedPnL = s.AccumulatedPnL.Add(profit.Profit)
|
||||||
s.AccumulatedNetProfit = s.AccumulatedNetProfit.Add(profit.NetProfit)
|
s.AccumulatedNetProfit = s.AccumulatedNetProfit.Add(profit.NetProfit)
|
||||||
|
|
||||||
s.TodayPnL = s.TodayPnL.Add(profit.Profit)
|
s.TodayPnL = s.TodayPnL.Add(profit.Profit)
|
||||||
s.TodayNetProfit = s.TodayNetProfit.Add(profit.NetProfit)
|
s.TodayNetProfit = s.TodayNetProfit.Add(profit.NetProfit)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user