Closed Rudy-Dev closed 2 years ago
for stocks I think you dont have to close positions you have to sell stocks for closing position but after market open I will give a try
Hi, I got it working however I cannot specify orderId, It is closing the first order on the list. This is the code that I used:
.tradeTransaction({
cmd: CMD_FIELD.SELL,
customComment: null,
expiration: 0,
offset: 0,
order: 0,
price: 1,
symbol: "LBW.PL",
tp: 0,
sl: 0,
type: TYPE_FIELD.OPEN,
volume: 500,
})
Hi there, the issue only occur when trying to close STC position doesn't happen when trying to close CRT position. I'm using XTB demo account.
code:
also here is error dump: