Update capital_manager.py
Browse files- capital_manager.py +1 -1
capital_manager.py
CHANGED
|
@@ -88,7 +88,7 @@ def get_risk_ratio(total_capital):
|
|
| 88 |
def update_after_trade(won: bool, profit_amount: float, filepath=STATE_FILE):
|
| 89 |
state = load_state(filepath)
|
| 90 |
|
| 91 |
-
if state["original_deposit"] is None and
|
| 92 |
bal = read_file(BALANCE_FILE, "0")
|
| 93 |
try:
|
| 94 |
bal = float(bal)
|
|
|
|
| 88 |
def update_after_trade(won: bool, profit_amount: float, filepath=STATE_FILE):
|
| 89 |
state = load_state(filepath)
|
| 90 |
|
| 91 |
+
if state["original_deposit"] is None and filepath != VIRTUAL_STATE_FILE:
|
| 92 |
bal = read_file(BALANCE_FILE, "0")
|
| 93 |
try:
|
| 94 |
bal = float(bal)
|