Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, 1 invisible), 942 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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