Gamestudio Links
Zorro Links
Newest Posts
Bug in train mode, or it seem to me
by jcl. 09/22/26 14:47
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 09/22/26 12:21
Capital slider is not saving in Z12
by Petra. 09/22/26 06:49
Parent/child object
by VoroneTZ. 09/22/26 05:52
Zorro tutorial ideas?
by AndrewAMD. 09/21/26 14:50
Trades during a running bar
by Martin_HH. 09/21/26 12:03
Avoiding pop-up training parameter results
by Martin_HH. 09/16/26 21:31
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (LoT, 1 invisible), 2,051 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lopezsergio07, mistery, lokkalyansamiti, rahulbuilds, speedx
19237 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Bug in train mode, or it seem to me #489657
6 hours ago
6 hours ago
Joined: Sep 2026
Posts: 2
M
mistery Offline OP
Guest
mistery  Offline OP
Guest
M

Joined: Sep 2026
Posts: 2
First i am a newbie, so sorry if i am missing something, thanks if some answer is received

Easy strategy over QQQ eod *t6 data, open trade any day of week at market open and close any day at market close (just for testing propose)
after train best parameters are 1.54 to open and 4.32 to close the trade. I test then to get a +17% annual return
Then i can open the *.par and change the 1.54 to 4.00, and test again to get a +142%, i can change to 1.00 and return is 63%
What i am doing wrong? to me seem the train is not getting best values.

I attack the QQQ.t6 data here: https://drive.google.com/file/d/1EunmN96XuVFCOmNWyxM7d62RDoU0ULlI/view?usp=drive_link
And copy the strategy bellow:



// Simple Zorro Lite-C bot:

TRADE *myTrade;


function run()
{
set(PARAMETERS,LOGFILE); // write a trade log so you can verify fills
BarPeriod = 1440; // 1440 minutes = daily bars (matches EOD data)
LookBack = 0; // no indicators, no warm-up period needed

StartDate = 20160101; // adjust to taste, or delete to use full history
EndDate = 20171231; // Dates need to match FFFFMMDD format if you put just FFFF not work
// in trest mode, just works to download data

//asset("IWM_eod"); // loads C:\Zorro\History\IWM_eod.t6
asset("QQQ"); // loads C:\Zorro\History\QQQ.t6
Spread = 0; // bid/ask spread in pips (or price units) — 0 = no spread cost
Slippage = 0; // slippage added to fill price — 0 = fill exactly at the modeled price
Commission = 0; // commission per lot/contract — 0 = no commission
RollLong = 0; // overnight long swap/rollover — 0 = no carry cost
RollShort = 0; // overnight short swap/rollover — 0 = no carry cost

// --- DIAGNOSTIC: print what Zorro sees on the days that matter ---
// if(dow(0) == (1) || dow(0) == 2 || dow(0) == 3 || dow(0) == 4 || dow(0) == 5)
// printf("\n%s dow=%i Open=%.3f Close=%.3f",
// strdate("%Y-%m-%d", 0), dow(0), priceOpen(), priceClose());

//setf(TrainMode,TRADES+PEAK); //Funciona por que en train da 1.00
var DiaPreOpen = optimize("Parametro DiaPreOpen",5,1,5,1);
int IntDiaPreOpen = (int)round(DiaPreOpen);
// (int) recast a still stored in the 8-byte
//floating-point format to a genuine integer, i tested without (int) and work
//var DiaSemana = optimize("Parametro DiaSemana",2,1,4,1);

// --- Entry: signal on Tuesday (2), fills at Wednesday's open ---
// Fill=3 delays the fill to the next price quote (next bar's open).
printf("\n DiaPreOpen=%.3f", DiaPreOpen); //Saldrá un float
printf("\n IntDiaPreOpen=%i", IntDiaPreOpen); // Saldrá un integer
if(dow(0) == IntDiaPreOpen && !myTrade) {
Fill = 3;
myTrade = enterLong();
}

// Fill=1 fills at the most recent quote instead of waiting for the next
// one, so with daily bars the close order fills at THIS bar's close
// (Thursday), not the following day's open.

var DiaClose = optimize("Parametro DiaClose",4,1,5,1);
int IntDiaClose = (int)round(DiaClose);
if(dow(0) == IntDiaClose && myTrade) {
Fill = 1;
exitTrade(myTrade);

// --- DIAGNOSTIC: confirm the exit landed on THIS (Thursday) bar
// and that no Stop/Trail line appears for this trade in the log.
printf("\n >> EXIT check: signaled %s (dow=%i) at Close=%.3f -- check trade log above for Stop/Trail lines",
strdate("%Y-%m-%d", 0), dow(0), priceClose());

myTrade = 0;
Fill = 3; // restore delayed fill for the next Tuesday entry
}
}

Re: Bug in train mode, or it seem to me [Re: mistery] #489659
1 hour ago
1 hour ago
Joined: Jul 2000
Posts: 28,135
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,135
Frankfurt
You can see in the parameter charts the performance of any parameter over its range. If training does not select the best parameter, it's either a single peak and thus an unstable system, or you have a bug in your script that affects trading.

If you can't find the bug, we do have a script fixing service. Contact support and they'll find it. Of course, if it really is a Zorro bug, the fee will be refunded - but from your description, this sounds very, very unlikely.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1