Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 722 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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