Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
6 registered members (TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible), 17,577 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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