OFF-TOPIC
Hi guys, this is my first post here and I'm really excited to be here. Many thanks to the creators of Zorro, you have really developed a great program - its surface is tiny - but there is something in it. Thank you also for the effort you put into assisting your users. I've been programming for many years, but I'm new to Lite-C and Zorro. English is not my mother tongue and everything I know about programming I have taught myself. That's why I sometimes express myself inaccurately or wrongly, thanks for your understanding.
OFF-TOPICI've found 2 errors, maybe I've also programmed something wrong, please take a look at it. I've upload 4 files to test with, parameter_test_"1-4".c.
Let's start with file (
parameter_test_1.c)...
After [TRAIN] everything looks fine, training is fast and we get some results. We have optimized 2 parameters, we see 2 pictures in the parameter charts htm file.
If we change only 1 line in the code now, the problems will start: (
in parameter_test_2.c)
while(asset(loop("EURUSD")))
while(algo(loop("TRND"))) {
changes to:
while(asset(loop("EURUSD")))
while(algo(loop("TRND:L","TRND:S"))) {
We now need twice as long as we train 2 different components, that's normal. We should now be able to see parameter charts
in which the optimized values for 2x2 parameters are visible. Zorro creates a parameter chart with 4 images,
but if you look closer, the 2 x 2 are the same?
<h1>parameter_test_2 Parameter Charts</h1>
<p> EURUSD TRND Parameter 1 (10 Cycles Average: 172.1)<br> <br><img src="parameter_test_2_EURUSD_TRND_p1.png"></p>
<p> EURUSD TRND Parameter 2 (10 Cycles Average: 1.798)<br> <br><img src="parameter_test_2_EURUSD_TRND_p2.png"></p>
<p> EURUSD TRND Parameter 1 (10 Cycles Average: 172.1)<br> <br><img src="parameter_test_2_EURUSD_TRND_p1.png"></p>
<p> EURUSD TRND Parameter 2 (10 Cycles Average: 1.798)<br> <br><img src="parameter_test_2_EURUSD_TRND_p2.png"></p>
Here is the first problem, test it with parameter_test_2.cIt shows 4 but only 2 not 2X2=4 graphics have been created, "parameter_test_2_EURUSD_TRND_p1.png" and "parameter_test_2_EURUSD_TRND_p2.png".
Not 2 for :L and 2 for :S...
Has anyone noticed this or have I already done something wrong here? I thought it was because I forgot to assign
the enterLong and enterShort to the respective component. So let's do that:(
in parameter_test_3.c)
if(valley(sig)) enterLong(); else
if(peak(sig)) enterShort();
changes to:
if(strstr(Algo,":L") && valley(sig)) enterLong(); else
if(strstr(Algo,":S") && peak(sig)) enterShort();
At this point, something was strange, Zorro was slowing down and you can see that the runtimes have increased.
EXITRUN @ bar 9955 time = 3234.774 ms
EXITRUN @ bar 9955 time = 6970.485 ms
Nothing strange in the log file, only the runtimes are much larger. I stopped it, it's time to make Verbose more active.
Does that happen because Zorro does not close the trades anymore? Or is something crashing here?
I changed the script and added exitLong() and exitShort() in (
parameter_test_4.c). This works and is just as fast as version parameter_test_2.
But... Unfortunately at the end of this trip I realized that the parameter charts from parameter_test_4.c are still wrong ...Thanks for your help
[EDIT] I've removed the part with diag and Chinese signs in it because that seems to be only here for me...