Gamestudio Links
Zorro Links
Newest Posts
TradeVars not working with pending trades
by jcl
2 seconds ago
Creating a Directory
by txesmi
Yesterday at 10:15
Multi asset correlation
by jcl
Yesterday at 09:57
Help in analysis...
by MINER
Yesterday at 09:13
Strange problem with a global int
by jcl
Yesterday at 08:48
New Zorro version 2.03
by jcl
Yesterday at 08:28
not using profit targets during strategy development
by laz
Yesterday at 00:23
AUM Magazine
Latest Screens
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Who's Online
6 registered (kvm, 20BN, Dalla, AndrewAMD, 2 invisible), 581 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Pelin27, Aziz, lucianopneto, j45p41, Max_Ahn
18173 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: 54
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: 26746
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: 54
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: 54
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: 26746
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