Gamestudio Links
Zorro Links
Newest Posts
Gaussian Crash Error
by TipmyPip. 07/21/24 11:54
Zorro Trader GPT
by TipmyPip. 07/20/24 06:46
Delaying Exit Order
by AndrewAMD. 07/17/24 11:38
Lapsa's very own thread
by rki. 07/14/24 16:39
LINUX Debian & Zorro problems
by juergen_wue. 07/13/24 07:15
Placing Order during Market Close
by jcl. 07/12/24 13:57
New Zorro version 2.62
by jcl. 07/12/24 13:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 939 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rramsey, Erasand, Cristoig2001, Mino, squik
19064 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Placing Order during Market Close #488299
07/09/24 10:30
07/09/24 10:30
Joined: Apr 2023
Posts: 28
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 28
I tried to place a GTC market order when market is closed, by using the SET_ORDERTYPE command. Based on the documentation, the order will be submitted as soon as the market is open.

However, when testing my code during closed hours, the following error occur. Obviously, I can't submit order during closed hours, but I am not sure if my GTC order is being placed or not.

Code
[361: Tue 24-07-09 10:21] (98.950)
Warning 075 (HE_N::L) - can't open 1@0.0 at 10:21:01


Here is my code:
Code
function run() 
{
  brokerCommand(SET_ORDERTYPE,2);
  TickTime = 500;
  StartDate = 1984;
  LookBack = 105;
  BarPeriod = 1440;
  Fill = 3;

  enterLong(1);

}


Last edited by vicknick; 07/09/24 10:31.
Re: Placing Order during Market Close [Re: vicknick] #488300
07/09/24 11:36
07/09/24 11:36
Joined: Aug 2017
Posts: 299
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 299
Netherlands
This is incorrect: "the order will be submitted as soon as the market is open"
The manual says nothing about placing orders outside market hours.

Warning 075: https://zorro-project.com/manual/en/errors.htm
SET_ORDERTYPE: https://zorro-project.com/manual/en/brokercommand.htm

Re: Placing Order during Market Close [Re: vicknick] #488301
07/09/24 15:31
07/09/24 15:31
Joined: Jul 2000
Posts: 27,990
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,990
Frankfurt
It is no problem to place GTC orders outside market hours, because that's a purpose of these orders. But your code is wrong. Look in the examples about how to set the trade mode to GTC.

Re: Placing Order during Market Close [Re: jcl] #488306
07/12/24 04:54
07/12/24 04:54
Joined: Apr 2023
Posts: 28
V
vicknick Offline OP
Newbie
vicknick  Offline OP
Newbie
V

Joined: Apr 2023
Posts: 28
Thanks for your reply. I am wondering, does GTC mode works for market order? Or it only works for limit order?

Re: Placing Order during Market Close [Re: vicknick] #488309
07/12/24 13:57
07/12/24 13:57
Joined: Jul 2000
Posts: 27,990
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,990
Frankfurt
For both.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1