Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
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
2 registered members (TipmyPip, AndrewAMD), 15,897 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
Placing Order during Market Close #488299
07/09/24 10:30
07/09/24 10:30
Joined: Apr 2023
Posts: 60
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 60
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: 311
Netherlands
G
Grant Offline
Senior Member
Grant  Offline
Senior Member
G

Joined: Aug 2017
Posts: 311
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: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
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: 60
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 60
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: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
For both.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1