Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 8,567 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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: 319
Netherlands
G
Grant Offline
Senior Member
Grant  Offline
Senior Member
G

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