Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by NeoDumont. 07/15/26 16:38
Z9 getting Error 058
by jcl. 07/15/26 15:07
Zorro version 3.0 prerelease!
by madpower2000. 07/14/26 20:11
Accepting new programming clients
by AndrewAMD. 07/14/26 19:32
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 07/09/26 13:16
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, madpower2000, AndrewAMD), 2,770 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 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: 61
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

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

Joined: Aug 2017
Posts: 318
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,123
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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

Joined: Apr 2023
Posts: 61
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,123
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1