Differentiate between trades+profit and profit in ES
This commit is contained in:
parent
6979b6c34a
commit
62d3f1a953
|
@ -552,9 +552,15 @@ class Transactions(object):
|
||||||
total_usd += trades_usd
|
total_usd += trades_usd
|
||||||
|
|
||||||
profit = total_usd - float(settings.Money.BaseUSD)
|
profit = total_usd - float(settings.Money.BaseUSD)
|
||||||
cast_es = {
|
if trades:
|
||||||
"profit_usd": profit,
|
cast_es = {
|
||||||
}
|
"profit_trades_usd": profit,
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
cast_es = {
|
||||||
|
"profit_usd": profit,
|
||||||
|
}
|
||||||
|
|
||||||
self.write_to_es("get_profit", cast_es)
|
self.write_to_es("get_profit", cast_es)
|
||||||
return profit
|
return profit
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue