understanding for(open_trades) and for(all_trades)

Posted By: webradio

understanding for(open_trades) and for(all_trades) - 11/28/14 16:03

Imagine, Zorro successfully opens a trade. After that, Zorro is closed and some time later opened again. (PC reboot etc.)

Will Zorro re-cap with broker server so that all open trades will be known within Zorro again?

What about pending trades? Zorro sends a limit order and then gets closed. While Zorro is not running, the broker might fullfill the order, but not necessarily. What will be returned by for(open_trades) and for(all_trades) when Zorro is running again?
Posted By: jcl

Re: understanding for(open_trades) and for(all_trades) - 12/01/14 16:48

Open trades will be remembered after closing and re-starting Zorro, pending and closed trades will not.
Posted By: webradio

Re: understanding for(open_trades) and for(all_trades) - 12/11/14 21:16

"pending trades will not be remembered after closing and re-starting Zorro" - lets say entryLong(0, -1.2345) is executed. Does it really send a limit buy order to broker? Does entryLong(0, 1.2345) really send a stop buy order to broker?

Please allow me yet another example. Zorro on PC "A" sends a market order and then PC "A" suddenly crashes (or powered off). I start Zorro on PC "B" with exactly the same strategy script. Will for(open_trades) know about the trade (given it has not been stopped out)?
Posted By: jcl

Re: understanding for(open_trades) and for(all_trades) - 12/13/14 08:50

A pending trade does not send something. it just waits until the entry condition is fulfilled, then the order is sent to the broker.

Open trades are stored in the .trd file and thus can be continued on another PC with another Zorro. For details look into the manual under "Trading".
© 2024 lite-C Forums