Skip to content

Commit

Permalink
Another bug bites the dust...
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   Base/Library/CONDmimic.py
  • Loading branch information
rapmd73 committed May 5, 2024
1 parent d2f73fc commit fd52f35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Base/Library/CONDmimic.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ def OrderProcessor(Orphan):
if dir=='long':
if ticker['Bid']>tp:
rpl=round((abs(amount)*sprice)-(abs(amount)*price),8)
if sl!=0 and ticker['Bid']<sl
if sl!=0 and ticker['Bid']<sl:
rpl=round((abs(amount)*price)-(abs(amount)*sprice),8)
else:
if ticker['Ask']<tp:
rpl=round((abs(amount)*price)-(abs(amount)*sprice),8)
if sl!=0 and ticker['Ask']>sl
if sl!=0 and ticker['Ask']>sl:
rpl=round((abs(amount)*sprice)-(abs(amount)*price),8)

# rpl is reported by broker. This is the actual profit/loss of trade.
Expand Down

0 comments on commit fd52f35

Please sign in to comment.