Hi,

I am testing tick() and tock() functions which both work well in Trade Mode. Tick() works in Test Mode as well however I couldn't make tock() work.

According to the manual, tock() should be triggered every bar without TICKS flag.
Quote

In [Test] or [Train] mode or in the lookback period, the tick and tock functions are normally called only once per bar. When the TICKS flag is set, the tick function is called at any new price quote in the historical data.


I modified Workshop4a.c to include tick() and tock() functions.
Logfile shows Tick() functions working but not Tock(). I can't see any errors either. How can I make tock() functional in Test Mode?

Thanks.

Code
// Indicator implementation example //////////////////////////////////
// Formula: Out[0] = (a-a^2/4) * In[0] + a^2/2 * In[1] - (a-3a^2/4) * In[2] + (2-2a) * Out[1] - (1-a)^2 * Out[2]

var lowpass(vars In,int Period)
{
	var a = 1./(1+Period);
	vars Out = series(In[0],3);
	return Out[0] = (a-0.25*a*a)*In[0]
		+ 0.5*a*a*In[1]
		- (a-0.75*a*a)*In[2]
		+ (2-2*a)*Out[1]
		- (1-a)*(1-a)*Out[2];
}

function tick()
{
	if(!is(LOOKBACK))
		print(TO_FILE," This is tick @ %s",datetime());
}

function tock()
{
	if(!is(LOOKBACK))
		print(TO_FILE," This is tock @ %s",datetime());
}

function run() // for testing
{
	set(LOGFILE,PLOTNOW); // ,TICKS
	
	Verbose = 3;
	NumYears = 1;
	
	plot("lowpass",lowpass(series(price()),10),LINE,RED);
}