jcl,

It would be useful if the script writer can "freeze" and "unfreeze" the pools. Allow me to explain.

Suppose an NFA account with Hedge = 5 has a stock with five different virtual positions, long and short, but we want to change all of those positions at the same time but ultimately submit a single trade to the broker to adjust the position.

The solution would then be to "freeze" the pool, open and close all of those virtual trades, and then "thaw" the pool. Upon "thaw", Zorro finally submits the desired pool order.

Example:
* Five virtual trades for MSFT are open, with the respective positions +10 -100 +20 -30 and +60, and therefore the pool is at -40.
* User calls poolFreeze(). All pools are frozen.
* User closes the first three virtual positions. So the total virtual position is at +30, but the pool is stuck at -40.
* User calls poolThaw(). All pools are unfrozen. Therefore, the pool changes position with a single order, increasing position from -40 to +30.

Why would I want this? Three reasons:
* Less brokerage fees.
* Reach desired position sooner.
* In the US, it is illegal to day trade stocks with an account size less than $25,000 - violators get their accounts frozen for months unless they put in enough cash. To avoid the violation, it makes sense to minimize the number of orders placed for a given stock. This freeze-thaw method would help.

Last edited by AndrewAMD; 07/29/19 13:26. Reason: fixed a number