Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (ozgur, TipmyPip, AndrewAMD), 1,209 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
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