Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (7th_zorro, Aku_Aku, 1 invisible), 604 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Error code when made simple change to 7 c tutorial #461685
08/17/16 12:24
08/17/16 12:24
Joined: Aug 2016
Posts: 8
T
trader18 Offline OP
Newbie
trader18  Offline OP
Newbie
T

Joined: Aug 2016
Posts: 8
Hello,

I tried making a simple change to the code in workshop 7.c.
I changed the BarPeriod from:

BarPeriod = 1440; // 1 day

to:

BarPeriod = 60; // 1 hour

The system crashed with error 039 "expression too long"

What have I done wrong?





function run()
{
StartDate = 2005;
EndDate = 2015;
BarPeriod = 1440; // 1 day

Re: Error code when made simple change to 7 c tutorial [Re: trader18] #461690
08/17/16 14:58
08/17/16 14:58
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
You need the FAST flag for this. The rule became too complex for being converted to a function.

Re: Error code when made simple change to 7 c tutorial [Re: jcl] #461708
08/18/16 02:38
08/18/16 02:38
Joined: Aug 2016
Posts: 8
T
trader18 Offline OP
Newbie
trader18  Offline OP
Newbie
T

Joined: Aug 2016
Posts: 8
I added FAST below with the same error.
Do you have an example please.
Thanks

function run()
{



StartDate = 2005;
EndDate = 2015;
BarPeriod = 60; // 1 day
BarZone = WET; // Western European midnight
Weekend = 1; // don't merge Friday and Sunday bars
LookBack = 3; // only 3 bars needed
NumWFOCycles = 10;

set(RULES+TESTNOW+FAST);

Re: Error code when made simple change to 7 c tutorial [Re: trader18] #461712
08/18/16 09:16
08/18/16 09:16
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Look in the manual under "adviseLong" about how to use the FAST flag for candle patterns. Generally, make the manual "Search" function your friend - all the issues that you have are easily solved by finding the right place in the manual.

For converting the script to 1-hour bars, some more things have to be considered besides just changing the bar period. You can find a script version for 1-hour bars on the Financial Hacker page, under "Better tests with oversampling".

Re: Error code when made simple change to 7 c tutorial [Re: jcl] #461719
08/18/16 11:52
08/18/16 11:52
Joined: Aug 2016
Posts: 8
T
trader18 Offline OP
Newbie
trader18  Offline OP
Newbie
T

Joined: Aug 2016
Posts: 8
Thanks jcl. I will try and learn that process.

As a newcomer, my first take on "zorro" is that it is a "black box" type system. That may be because I do not know where to look things up, it may be because it is not week documented or it may be because the architects want to keep you in the dark.

Not sure yet. It almost reminds me at this point of programming a FIX API to a broker that has few examples.

Just an observation.

My next question is where to get more of this knowledge. I will try the searching function in the manual. Perhaps that will help (although hardly efficient). What about subscribing to the "ticket" service. That service said that they do not fix code nor provide examples? What is the "service" then, not sure.

I also noticed there was a "German" version of the documentation that was supposedly better written and more in depth. Is there a transalation? Is this meant more for the "German" market that the "English" market?

One of the reasons I love to program in Python (even though it is slow a molasses, is that I can verify everything myself, tons of libraries and tons of ways to verify the calculations)

Anyway, I have rambled enough. Perhaps this info will help the next guy

Re: Error code when made simple change to 7 c tutorial [Re: trader18] #461720
08/18/16 11:52
08/18/16 11:52
Joined: Aug 2016
Posts: 8
T
trader18 Offline OP
Newbie
trader18  Offline OP
Newbie
T

Joined: Aug 2016
Posts: 8
should have said not "well documented", oops

Re: Error code when made simple change to 7 c tutorial [Re: trader18] #461770
08/19/16 21:40
08/19/16 21:40
Joined: Jul 2016
Posts: 1
A
AlexHorn Offline
Guest
AlexHorn  Offline
Guest
A

Joined: Jul 2016
Posts: 1
Oh, that´s nice (for German speakers at least). Could you share the link for the German documentation please?

Re: Error code when made simple change to 7 c tutorial [Re: AlexHorn] #461904
08/28/16 14:13
08/28/16 14:13
Joined: Aug 2016
Posts: 61
D
dr_panther Offline
Junior Member
dr_panther  Offline
Junior Member
D

Joined: Aug 2016
Posts: 61
I´m also interessted in the German documenation

Re: Error code when made simple change to 7 c tutorial [Re: dr_panther] #461905
08/28/16 17:09
08/28/16 17:09
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Although I thought the same way when I started interessting in algorhithmic trading - the other way around is IMO the better one because really a lot of serious books, articles and other readings are in English and a lot of people with interessting opinions publish them in this language. So I think it's more sensful to learn the vocabulary to understand the docs in their original writing, you can use it later many times!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1