Hello all, I just discovered Zorro and I'm pretty excited about what I've found. I'm testing scripts and things out slowly and deliberately and just taking my time to observe how things behave. I've run into some hurdles however on some seemingly basic and fundamental things. I've started out with a very very basic script with no frills just to check out if everything I'm doing is correct:

Code
function run() 
{
   StartDate = 20221012;
   EndDate = 20221013;
	
   StartMarket = 1430; // 2:30pm UTC equals 9:30am EST?
   EndMarket = 2200;   // 10:00pm UTC equals 5:00pm EST?
   
   MaxLong = 1;
   Fill = 0;
   Slippage = 0;
   Penalty = 0;
   Stop = 10;
   TakeProfit = 20;

   BarPeriod = 5;
   asset("US30");
	
   var r = random();
   if (r >= .90) enterLong();
}



In my silly little test script, I just want to enter long in the Dow US30 at random times (basically 1 out of every 10 bars) on a 5 minute chart over a couple of days data only. I'm getting tripped up on a few things though:

(1) When I run the backtest, I do not get any trades listed out in the appropriate file in my LOG folder (even though my backtest does successfully produce trades, about 30 or so)... please see attached screenshot zorro-1. Maybe I'm not even looking in the right place? I did read how there's file-writing issues when you install Zorro to folders that have a "space" in the directory name... like "Program Files". So I just used what the installation default gave and installed to my "Users" folder (I'm using Windows 10).

(2) I wish to backtest only during Regular Session Hours (plus 1 additional hour) of the NYSE (ie. 9:30am EST till 5:00pm EST). I'm using the freely provided Forex/CFD data from the Zorro website and I do understand that it is all in UTC time, so I made what I thought is the appropriate adjustments to "StartMarket" and "EndMarket" in order to hone in on only the data I want. It doesn't seem to make any difference however, as my strategy still places trades outside of these hours as you can see in attached screenshot zorro-2 (easiest to see are trades at 01:00 through 04:00 on Oct 13). Should the chart even display data at all from outside my desired hours? I guess there must be something more to it than simply setting StartMarket/EndMarket in the script, I would gather.

(3) My strategy has a simple takeprofit of 20 points and stoploss of 10 points, and in eyeballing the backtest trades from the "Results" chart, most seem bang on, except for a few occurrences where a trade will get stopped out at only 5 points, as you can see in the attached screenshot zorro-3 below. Puzzled as to why.


So a few basic things causing me to get off to a bit of a sputtering start here. I think once I get these basic things ironed out however, I ought to really be able to start cruising and get proper work done.

Thanks to all!
ShawnM

Attached Files zorro-1.jpgzorro-2.jpgzorro-3.jpg