Thank you, JCL.

Quote:
The trade is then opened with parameters from period A and closed with parameters from period B.


So, if the starting position in B should be short, will Zorro close the open long position from period A?

Quote:
For periods in days, just multiply the number of days by 1440/BarPeriod


A common scenario is to close positions end-of-day or end-of-week. And therefore a WFO cycle is naturally linked to "sessions" rather than bars. And sessions can be quite different across assets.
But the main problem is holidays and early closes. What would you recommend?
I believe adding a "calendar" way to specify periods (across Zorro) would simplify life in many use cases.

Quote:
All prices are used. The mid point is Price - 0.5*Spread.

How to correctly program to accept a bid in Real-Time to calculate spread (in case of IB)?
Or spread calculation in RT happens automatically regardless of pre-set spread amount?
Can one just use a t8 contract structure for Forex?

Quote:
The order management depends on the broker API implementation.

How developed is it for IB plug-in?
How can one programmatically handle order rejection?
Get broker order ID -is it TradeID in TMF? applicable to IB? Cancel an order?

Quote:
Normally a trade is cancelled when it is not filled within a certain time period.

Does this also pertain to a limit order? What would this "period" be for IB Plugin?

Quote:
TMF return values:
1 - if the trade is still open or pending, exit it now.

If the "trade is pending" - can mean a rejected/pending market order?
"Exit now" a pending "buy@limit " - means cancel a limit order?

Quote:
2 - if the trade is still pending, enter it now.

Does it mean that a pending limit/stop order is converted to market order?

What's the way to obtain an order fill price (from the broker)?
(especially in the case of stop orders which can execute intrabar). Having a TMF function execute on every tick is inefficient if the whole strategy evaluates on a timeframe.



Last edited by Zheka; 07/05/17 00:38.