From 2.40.5. As you can see, none of the other tmf events were triggered at 1840. Therefore it must be triggered by a normal tick.

All I am saying is that the TMF execution, regardless of event type, should run AFTER tick() tock(), like it was in v.2.35 and many version before.

The manual says "TMF runs at every tick". Therefore you must allow tick() and tock() to completely finish and provided any pre-processing that is related to that tick. In my case, that pre-processing is loading tick specific options chains, before TMF can run so that the TMF can have all the latest prices associated with that new tick.

In my example below, the UL price ($3816.59) is from time 1840 and the options price is from time 1838 (UL=$3815.3). This is wrong.

Thanks.

Code
[1840] INSIDE myTMF[489449]: priceClose(0)=3816.59 
TradeIsEntry = 0
TradeIsStop = 0
TradeIsProfit = 0
TradeIsClosed = 0
2021-03-05,Call,20210308,3810.0,3815.3,32.60,32.10,0.529,773,   <------ this option data is from the previous tick at time 1838
ContractBid[32.10]  ContractAsk[32.60]  TradeStopLimit[27.75]

[4895: 1840] tick priceClose[3816.59]

[4895: 1840] TOCK -- [SPX] Loading chain... 
[4895: 1840] TOCK priceClose[3816.59] -- [C:\Zorro\History\SPX-Options\\SPX_202103_m1.t8] 600 contracts loaded...

[4895: Fri 21-03-05 18:40] 860 -1912 5/4 3815.25/3816.59\3815.09/3816.59 -0.01SliderLots = 20


Last edited by SBGuy; 08/19/21 15:47.