New TradeMode TR_POOLDELAY

Posted By: AndrewAMD

New TradeMode TR_POOLDELAY - 08/16/19 15:03

jcl,

Currently, if a virtual trade is entered in tick() or a TMF, the pool trade occurs instantly.

It would be helpful if this can be overridden such that all pool trades take place at the end of all pending tick() and TMF calls.

What happens now:
tick() is called, virtual trade is opened/closed, pool trade executed immediately.
TMFs are called, various virtual trades are closed, pool trade executed immediately.

New feature:
setf(TradeMode, TR_POOLDELAY)
tick() is called, virtual trade is opened/closed. (nothing happens to the pool yet.)
TMFs are called, various virtual trades are closed. (nothing happens to the pool yet.)
No tick or TMF calls remain. Now adjust the pool. (Alternatively, wait for an explicit call to a new function tradePool().)

Thanks,
Andrew
Posted By: Petra

Re: New TradeMode TR_POOLDELAY - 08/17/19 21:46

To enter a pool trade not in tick() but later, I would simply sum up the lots in tick() and then enter later the trade.
© 2024 lite-C Forums