Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Syntax error in ghost lune #486990
12/15/22 00:58
12/15/22 00:58
Joined: Mar 2021
Posts: 24
A
antoniorenar Offline OP
Newbie
antoniorenar  Offline OP
Newbie
A

Joined: Mar 2021
Posts: 24
Hello, I have a problem. I have written my program in 34 lines and when I test it, the following error appears in 'line 37 syntax error.
This is the code

var objective()
{
return (WinTotal-LossTotal)/max(1,DrawDownMax);
function run()
{
set(LOGFILE);
set(PARAMETERS);
setf(PlotMode,PL_BENCHMARK+PL_FINE);
set(BALANCE);
setf(TrainMode,GENETIC+TRADES);
set(TESTNOW);
set(PLOTNOW);
assetList("AssetsAntonio");
StartDate=20000101;
EndDate=20220312;
BarPeriod = 15;
LookBack = 672;
NumWFOCycles = -10;
DataSplit = 60;
NumCores = -1;
int
HoraEntrada=0630, /*BarrasParaSalir = optimize(33,0010,2310,100)*/ BarrasParaSalir=33;
for(listed_assets)
{
asset(Asset);
Spread = marketVal(0);
if( tod(0)==HoraEntrada and (TradeIsClosed or TradeIsLong) and dow(0)==5 )
{
Lots = 1;
enterShort();
}
if( TradeIsOpen and TradeIsShort and TradeBars >= BarrasParaSalir ) exitShort();
}

Has anyone else had the same thing, any help is appreciated.
[Linked Image]

Re: Syntax error in ghost lune [Re: antoniorenar] #486994
12/15/22 20:24
12/15/22 20:24
Joined: Aug 2017
Posts: 311
Netherlands
G
Grant Offline
Senior Member
Grant  Offline
Senior Member
G

Joined: Aug 2017
Posts: 311
Netherlands
You forgot to finish the objective() and run() functions with a closing bracket.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1