-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Good day all.
I having trouble to get order results or to check win. i want to check if my order was a successfull win or not to intergrade a martingale strategy
basically checking results or get active order both show the same thing. the active status always shows active even thou the trade has finished and at profit it just shows the profit that is being obtained if trade is successfull and not actual trade winnings.
here is a traceback:
check_order_results:
Order Result: order_id='027965fb-c120-4947-968f-a40216957634' asset='EURUSD_otc' amount=1.0 direction=<OrderDirection.PUT: 'put'> duration=60 status=<OrderStatus.ACTIVE: 'active'> placed_at=datetime.datetime(2025, 7, 22, 16, 13, 28, 367905) expires_at=datetime.datetime(2025, 7, 22, 16, 14, 28, 367909) profit=0.92 payout=None error_message=None
get_active_orders:
Active Orders:
order_id='027965fb-c120-4947-968f-a40216957634' asset='EURUSD_otc' amount=1.0 direction=<OrderDirection.PUT: 'put'> duration=60 status=<OrderStatus.ACTIVE: 'active'> placed_at=datetime.datetime(2025, 7, 22, 16, 13, 28, 367905) expires_at=datetime.datetime(2025, 7, 22, 16, 14, 28, 367909) profit=0.92 payout=None error_message=None
check_win just hangs and i have to manually stop the script. but as you can see above that the active and get results show the same things. so i cant determine if the order was a win or not.
for now i will just use check balance to determine win or loss.
but please if anyone has a fix for this, it will be really helpfull.
thanks in advance