Gamestudio Links
Zorro Links
Newest Posts
long time to load data
by qin. 12/29/25 14:06
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
ZorroFix. ini /data and /log path
by Martin_HH. 12/19/25 21:02
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (vicknick), 81,396 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How does one code a limit order in Zorro? #487655
07/02/23 12:42
07/02/23 12:42
Joined: Apr 2022
Posts: 18
Singapore
V
vinitrinh Offline OP
Newbie
vinitrinh  Offline OP
Newbie
V

Joined: Apr 2022
Posts: 18
Singapore
I'm looking to code a limit order (an actual limit order sent to the broker / exchange)

I've read the following links and understand that the key is the "OrderLimit" parameter

https://zorro-project.com/manual/en/stop.htm
https://zorro-project.com/manual/en/timewait.htm
https://zorro-project.com/manual/en/lots.htm

However, I still don't get how to do it.

Can I have a quick snippet on how to place the limit order please?
It could also be useful for others if placed in the documentation.

Thanks and regards smile

Re: How does one code a limit order in Zorro? [Re: vinitrinh] #487669
07/13/23 09:30
07/13/23 09:30
Joined: Jul 2000
Posts: 28,044
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,044
Frankfurt
// place limit order at ask/bid center
OrderLimit = priceC() - 0.5*Spread;
enterLong();

Re: How does one code a limit order in Zorro? [Re: vinitrinh] #487692
07/28/23 15:32
07/28/23 15:32
Joined: Apr 2022
Posts: 18
Singapore
V
vinitrinh Offline OP
Newbie
vinitrinh  Offline OP
Newbie
V

Joined: Apr 2022
Posts: 18
Singapore
Thanks!

I'm playing around with the order limit entry on MT5.

I noticed that the "profit" log registers profit/loss even before the limit order is filled.
(img attached)

Is this expected behaviour?
Before the limit order is actually filled, are Zorro's active TakeProfit / Stop orders active?
If the limit order is actually filled, will the TakeProfit / Stop react based on the market price or the order price or the filled price?

Attached Files mt5 pending order is registered as a live trade.png
Re: How does one code a limit order in Zorro? [Re: vinitrinh] #487758
09/07/23 15:28
09/07/23 15:28
Joined: Apr 2021
Posts: 22
S
scatters Offline
Newbie
scatters  Offline
Newbie
S

Joined: Apr 2021
Posts: 22
Bump.


Were you able to find a solution to this? We are experiencing a similar issue.

Re: How does one code a limit order in Zorro? [Re: jcl] #487759
09/07/23 15:29
09/07/23 15:29
Joined: Apr 2021
Posts: 22
S
scatters Offline
Newbie
scatters  Offline
Newbie
S

Joined: Apr 2021
Posts: 22
Hi JCL,

could you comment on vinitrinh inquiry above?


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1