Gamestudio Links
Zorro Links
Newest Posts
How is this possible ? winning percentage 100%
by MatPed
50 minutes 13 seconds ago
Next contest?
by Michael_Schwarz
Today at 10:33
Help! 1.88.6 Crashes <5 minutes after clicking Trade!
by jcl
Today at 10:28
WFO
by jcl
Today at 10:27
TA-Lib not updated
by jcl
Today at 10:24
CyberCycle Adaptive Cy
by OptimusPrime
Today at 05:26
video memory and d3d_texfree
by Superku
Yesterday at 11:17
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
16 registered (CocaCola, kvm, MatPed, Iglarion, AndrewAMD, brax, Michael_Schwarz, Mio, 2 invisible), 454 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
fandi, Deedee, avgtrader, aventador, gokhanuck
18103 Registered Users
Topic Options
Rate This Topic
#473438 - 07/06/18 06:24 Converting a daily script with some intraday calculations
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 53
I have a script that operates on daily bars and runs once per day at 15:00 ET. I want to keep all the indicator series and analysis on a daily basis, but execute the run() function multiple times per day to enter or exit trades based on intraday dynamics.

I thought I could do this, but it didn't work:

Code:
void run()
{
   BarPeriod=60;
   AssetMarket = ET;
   TimeFrame=AssetFrame;
   LookBack = 250;



I found some pointers on these pages:
http://zorro-trader.com/manual/en/assetzone.htm
http://zorro-trader.com/manual/en/barperiod.htm

The test results didn't look right, and I get error messages about not having enough bars. I only have EOD .t6 datafile to work with. Will having M1 .t6 data solve this problem?

This is the original setup:
Code:
void run() 
{

	BarPeriod = 1440;		
	BarZone = ET;
	BarOffset = 15*60; // trade at 15:00 ET
	LookBack = 250;



Edited by SBGuy (07/06/18 06:33)

Top
#473440 - 07/06/18 16:09 Re: Converting a daily script with some intraday calculations [Re: SBGuy]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26597
Loc: Frankfurt
Yes, you'll need at least H1 data for H1 bars. Otherwise you'll get error messages.

Top
#473444 - 07/07/18 06:41 Re: Converting a daily script with some intraday calculations [Re: jcl]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 53
thanks jcl. what's a good, reasonably priced, source for H1 data?

Top
#474051 - 09/14/18 02:01 Re: Converting a daily script with some intraday calculations [Re: SBGuy]
SBGuy Offline
Junior Member

Registered: 05/27/18
Posts: 53
jcl, follow up thought on this.

Can I backtest using a BarPeriod=1440, get my optimzed varaibles, then if(is(TRADEMODE)) use a BarPeriod of 60, and a TimeFrame=AssetFrame?

Thanks!

Top
#474064 - 09/17/18 17:48 Re: Converting a daily script with some intraday calculations [Re: SBGuy]
jcl Online

Chief Engineer

Registered: 07/22/00
Posts: 26597
Loc: Frankfurt
Theoretically yes, but make sure that the live time frame opens and closes at the same time as a bar in the backtest.

Top



Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de