Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
6 registered members (krishna, JeyKey II, AndrewAMD, rht, EvanTJ, Quad), 12,708 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
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: 23
S
scatters Offline
Newbie
scatters  Offline
Newbie
S

Joined: Apr 2021
Posts: 23
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: 23
S
scatters Offline
Newbie
scatters  Offline
Newbie
S

Joined: Apr 2021
Posts: 23
Hi JCL,

could you comment on vinitrinh inquiry above?


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1