Skip to content

Commit

Permalink
Bug fix in handling conditionals for crypto.
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   Base/Library/CONDccxt.py
  • Loading branch information
rapmd73 committed Apr 30, 2024
1 parent bc8934b commit c336a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Base/Library/CONDccxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def OrderProcessor(Orphan):

# find trade open time
parts=oDetail['datetime'].split('.')
dsS=f"{parts[0]}.{parts[1][:6]}Z"
dsS=f"{parts[0]}.{parts[1][:6]}Z".replace('ZZ','Z')
ds=datetime.datetime.strptime(dsS,'%Y-%m-%dT%H:%M:%S.%fZ')

# Get the "strikePrice". This handles both TakeProfit and StopLoss. It doesn't matter which as both are processed
Expand Down Expand Up @@ -175,7 +175,7 @@ def OrderProcessor(Orphan):

# find trade close time and duration
parts=resp['datetime'].split('.')
deS=f"{parts[0]}.{parts[1][:6]}Z"
deS=f"{parts[0]}.{parts[1][:6]}Z".replace('ZZ','Z')
de=datetime.datetime.strptime(deS,'%Y-%m-%dT%H:%M:%S.%fZ')
duration=de-ds

Expand Down

0 comments on commit c336a17

Please sign in to comment.