Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Exiting unfilled GTC orders per script #486281
07/12/22 18:56
07/12/22 18:56
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
in run(), I check if a GTC order is unfilled in a trade enumeration loop. If it is, I want to cancel it. I tried doing exitTrade(ThisTrade) but I've noticed that Zorro then tries to "close" this position by sending another order with Amount = 0 through BrokerBuy2 (NFA), when in reality it should simply cancel the order and not place another one. DO_CANCEL is implemented for that purpose but not called here.

Is there a correct way of canceling GTC orders that are completey unfilled thus far? (without using OrderDuration)

Re: Exiting unfilled GTC orders per script [Re: MegaTanker] #486286
07/13/22 08:33
07/13/22 08:33
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Call DO_CANCEL directly. exitTrade would also close any partially filled amount.

It was already suggested that we implement easier order control. This will be done in a future version.

Re: Exiting unfilled GTC orders per script [Re: MegaTanker] #486287
07/13/22 10:19
07/13/22 10:19
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Alright, thanks. That is good to hear


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1