Can I test only the first 5 minutes of ticks for each day?

Posted By: TalonTrades

Can I test only the first 5 minutes of ticks for each day? - 07/18/21 13:57

I'm working on a market opening strategy that uses tick data and 1 second bar logic, but only for the first five minutes of regular trading hours.

Testing takes a long time, I suspect because the ticks for the entire day are being processed.

Is there a way for the test to process only the first 5 minutes of data?

I set StartMarket = 930; and EndMarket = 935; but this does not seem to help.

Here is the relevant parameter setup I'm using now:

Code
function run()
{
	set(TICKS);
	History=".t1";
	StartDate = 20210515;
	EndDate = 20210716;
	BarPeriod = 1./60;
	MaxLong = MaxShort = 1;

        ...
}
Posted By: jcl

Re: Can I test only the first 5 minutes of ticks for each day? - 07/19/21 12:27

There is no direct command to suppress bars. I can think of two solutions:

-After the 5 minutes have passed, skip all bars until the next hour: Bar += 60/BarPeriod. This is a hack and I don't know if it works, but you can try it.
- Produce a special history that only contains the first 5 minutes of any day, and afterwards only one bar per hour. That's normally the best solution since it saves memory.
© 2024 lite-C Forums