Closing positions

Moderator: Moderator

Closing positions

Postby JimHowell1970 » Tue Apr 11, 2023 11:30 am

Hi

I think I have found a bug...

when closing positions I get an error

ERROR:root:Request failed GBDEMO_F2572687ECABDDACE053DF2B3C0A5119_04112023154000670055_R6Q-405: Description=19915;DAS 19915: ZDas Exception
ORA-20008: No quantity specified: $d.

I am specifying all fields as in the closepositions.py example... ie amount = trades.amount

& the position was not closed

I then closed the positions manually (I'm trying to test open and close of position)

however an "OL" order was created and could be seen in the orders section of the portfolio... with the amount in the buy field??? and the time matching the closeposition request

I then tried to delete the "OL" order & it doesn't appear to be delete-able possibly due to the trade no longer existing (due to having been manually closed, above)

I will see if I can replicate

is there anyway to close a trade just with the account_id & the trade_id? - this would make a lot of sense - ie close this trade now!!!
JimHowell1970
 
Posts: 2
Joined: Wed Jan 11, 2023 11:20 am

Re: Closing positions

Postby JimHowell1970 » Wed Apr 12, 2023 9:48 pm

I think I had the Buy/Sell the wrong way round... position is now closing properly
JimHowell1970
 
Posts: 2
Joined: Wed Jan 11, 2023 11:20 am


Return to ForexConnect-Python API

Who is online

Users browsing this forum: No registered users and 6 guests