Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,098 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Having Issues Running A Tweaked Version Of Workshop4 #472452
04/28/18 17:19
04/28/18 17:19
Joined: Apr 2018
Posts: 1
FL
G
Gerald Offline OP
Guest
Gerald  Offline OP
Guest
G

Joined: Apr 2018
Posts: 1
FL
Hello All,

I am new to Zorro and the community and excited to dive in. I have about a year of programming experience and about 2 months of experience in the trading world.

So I've gone through all the basic workshops on the User Manual and was able to run every file successfully, but once I tried running Workshop4 with a few tweaks as well as linking to an OANDA practice account, I keep running into issues. Here is my tweaked version of the code:


// Trend Trading ///////////////////
#include <profile.c>

function run()
{

asset("USD/JPY");

BarPeriod = 60; // 4 hour bars
StartDate = 2010;
EndDate = 2017; // fixed simulation period
LookBack = 500;
Verbose = 2;
set(LOGFILE); // log all trades

vars Price = series(price());
vars Trend = series(LowPass(Price,500));

Stop = 4*ATR(100);

vars MMI_Raw = series(MMI(Price,300));
vars MMI_Smooth = series(LowPass(MMI_Raw,300));

if(falling(MMI_Smooth)) {
if(valley(Trend))
enterLong();
else if(peak(Trend))
enterShort();
}
}


The error I keep running to is:

Error 047: Not enough bars (65 missing)

What am I doing wrong? I've played with LookBack, although it doesn't make any sense to me to have to lower the value of it and no reason to increase it.

I've played around with StartDate and EndDate and that hasn't helped. And for some reason, whenever I would set it to (for example) 2015 - 2016, it would automatically show on Zorro that I requested 2015 - 2020... Not sure why it automatically just adds 5 years to StartDate.

Any help would be greatly appreciated. Thanks!

Re: Having Issues Running A Tweaked Version Of Workshop4 [Re: Gerald] #472477
04/30/18 01:20
04/30/18 01:20
Joined: Mar 2017
Posts: 21
J
jyd Offline
Newbie
jyd  Offline
Newbie
J

Joined: Mar 2017
Posts: 21
Try to move your assert(..) line down to below Loopback line. The order of how you put together your code is important in Zorro coding. you might look into workshop 6 carefully to see how this is put together. good luck


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1