jcl,
in 2.42.5, TMFs are now called when a trade is pending, great.
However, there is something wonky going on when TMF returns 4.
int tmf() {
watch("#time=",tod(0));
if (TradeIsEntry) return 4;
return 0;
}
function run() {
NumYears=1;
set(LOGFILE, TICKS);
LifeTime=5;
Entry=-3*PIP;
if (NumOpenLong==0)
if (priceClose(0)>priceClose(20) )
enterLong(tmf);
}
produces some weird output:
[104: Fri 21-01-08 08:00] 0000 0 0/0 (0.776700)
(AUD/USD::L) Long 1@0.776400 Entry limit
time= 800
(AUD/USD::L) Missed entry 0.77753 after 1 bar <---???
(AUD/USD::L) Entry limit 0.776400 hit at 0.776090 08:01:00
time= 801
[105: Fri 21-01-08 09:00] 0000 0 0/0 (0.776450)
(AUD/USD::L) Long 1@0.776150 Entry limit
time= 900
(AUD/USD::L) Missed entry 0.77640 after 1 bar <---???
time= 901
time= 902
time= 903
time= 904
(AUD/USD::L) Entry limit 0.776150 hit at 0.776080 09:05:00
time= 905
TMF now does not run once the trade is open!?