Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 01/31/26 10:01
Lapsa's very own thread
by Lapsa. 01/30/26 19:44
Zorro version 3.0 prerelease!
by TipmyPip. 01/30/26 13:36
Historical Data with the 64bit FXCM Plugin
by Martin_HH. 01/28/26 18:45
SGT_FW
by Aku_Aku. 01/27/26 15:10
Buy A8 Pro Version
by Ezzett. 01/26/26 14:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (TipmyPip, qin), 17,373 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Sfrdragon, mayarik, Castromangos, Quantum, stephensdeborah
19195 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