Skip to content

Commit 2577f15

Browse files
committed
format log
1 parent 993b114 commit 2577f15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trader/strategy/brother2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def calc_signal(self, inst: Instrument, day: datetime.datetime) -> (Signal, Deci
827827
risk_each = Decimal(df.atr[idx]) * Decimal(inst.volume_multiple)
828828
volume_ori = (start_cash + profit) * risk / risk_each
829829
volume = round(volume_ori)
830-
print(f"{inst}: {start_cash:,.0f} + {profit:,.0f} / {risk_each:,.0f} = {volume_ori}")
830+
print(f"{inst}: ({start_cash:,.0f} + {profit:,.0f}) / {risk_each:,.0f} = {volume_ori}")
831831
if volume > 0:
832832
new_bar = DailyBar.objects.filter(exchange=inst.exchange, code=inst.main_code, time=day.date()).first()
833833
use_margin = new_bar.settlement * inst.volume_multiple * inst.margin_rate * volume

0 commit comments

Comments
 (0)