Gamestudio Links
Zorro Links
Newest Posts
sub group backtesting
by AndrewAMD. 09/25/21 13:11
Company holidays next week
by Frederick_Lim. 09/25/21 07:48
AlpacaZorroPlugin v1.1.0 Released
by DdlV. 09/24/21 12:05
Lapsa's very own thread
by Lapsa. 09/24/21 09:52
Directa Broker
by Grant. 09/24/21 07:30
Malfunction W1301
by pegamode. 09/24/21 06:23
Banca Sella Rest APi
by AndrewAMD. 09/23/21 16:54
AUM Magazine
Latest Screens
Tactics of World War I
Hecknex World
Scheherazade's Journey
Paradox Vector
Who's Online Now
7 registered members (7th_zorro, MegaTanker, Smon, dpn, jari, titanicpiano14, AndrewAMD), 488 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
jpeigentower, TimExcellent, Arkom, Raven478, SebVer
18685 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Can I test only the first 5 minutes of ticks for each day? #483730
07/18/21 13:57
07/18/21 13:57
Joined: Jul 2021
Posts: 8
TalonTrades Offline OP
TalonTrades  Offline OP

Joined: Jul 2021
Posts: 8
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:

function run()
	StartDate = 20210515;
	EndDate = 20210716;
	BarPeriod = 1./60;
	MaxLong = MaxShort = 1;


Last edited by TalonTrades; 07/18/21 14:02.
Re: Can I test only the first 5 minutes of ticks for each day? [Re: TalonTrades] #483733
07/19/21 12:27
07/19/21 12:27
Joined: Jul 2000
Posts: 27,620
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,620
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.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1