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
0 registered members (), 18,175 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
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,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
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