Converting a daily script with some intraday calculations

Posted By: SBGuy

Converting a daily script with some intraday calculations - 07/06/18 04:24

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;

Posted By: jcl

Re: Converting a daily script with some intraday calculations - 07/06/18 14:09

Yes, you'll need at least H1 data for H1 bars. Otherwise you'll get error messages.
Posted By: SBGuy

Re: Converting a daily script with some intraday calculations - 07/07/18 04:41

thanks jcl. what's a good, reasonably priced, source for H1 data?
Posted By: SBGuy

Re: Converting a daily script with some intraday calculations - 09/14/18 00:01

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!
Posted By: jcl

Re: Converting a daily script with some intraday calculations - 09/17/18 15:48

Theoretically yes, but make sure that the live time frame opens and closes at the same time as a bar in the backtest.
© 2024 lite-C Forums