How does one code a limit order in Zorro?

Posted By: vinitrinh

How does one code a limit order in Zorro? - 07/02/23 12:42

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
Posted By: jcl

Re: How does one code a limit order in Zorro? - 07/13/23 09:30

// place limit order at ask/bid center
OrderLimit = priceC() - 0.5*Spread;
enterLong();
Posted By: vinitrinh

Re: How does one code a limit order in Zorro? - 07/28/23 15:32

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 picture mt5 pending order is registered as a live trade.png
Posted By: scatters

Re: How does one code a limit order in Zorro? - 09/07/23 15:28

Bump.


Were you able to find a solution to this? We are experiencing a similar issue.
Posted By: scatters

Re: How does one code a limit order in Zorro? - 09/07/23 15:29

Hi JCL,

could you comment on vinitrinh inquiry above?
© 2024 lite-C Forums