Below is a quote from the manual, emphasis added:
enterTrade (TRADE*): TRADE*
Enters an already open, pending, or closed trade from a TRADE struct. Does not send any order to the broker. The asset name is passed through TradeStr resp. the Skill element of the TRADE struct. This function can be used for running backtests from a list of trades (see Simulate script) or for reading positions from the broker API and converting them to trades.
This sounds like a super-useful feature! However, the documentation does not offer guidance for setting up the TRADE struct for trade position adjustments.
If Virtual Hedging is enabled, do I only enterTrade a phantom trade? Will zorro then automatically enterTrade a corresponding pool trade, or do I have to manually enterTrade the pool trades as well? Finally, does LotsPool get adjusted correctly?
The asset name is passed through TradeStr resp. the Skill element of the TRADE struct.
How am I supposed to set TMF general purpose variables if it's occupied by an Asset string? Why not deduce the Asset from the last asset() call? I see that it already deduces Algo from the last algo() call.