Posted By: laz
Re: advise calls in TRAINMODE/TESTMODE slow - 08/14/19 16:05
Hi guys,
I'm using the advise (NEURAL) functions with Zorro 2.14.
My Input Array has length 200, atm all Inputs are 0 to test something i have seen in TRAINMODE.
While preparing the data for the export you can clearly see, how the time for working with 1000 Bars does increase.
Gives the following result:
So i assume that Zorro collects the data in the advise(L/S) calls and is reallocating the memory again and again or something like this?
While doing this Zorro has not called anything in neural(mode = NEURAL_TRAIN), so it looks like i can't fix this?
Any Ideas?
EDIT: Ohh i think i found the reason: https://manual.zorro-project.com/advisor.htm
Does Zorro append the new data on every bar, to a string?
And by the way, 2.14 does not stop training if neural(mode = NEURAL_TRAIN) does return(0);
I'm using the advise (NEURAL) functions with Zorro 2.14.
Code
#define INP_LEN 200 var INP[INP_LEN]; avl = adviseLong (NEURAL,obl,INP,INP_LEN); avs = adviseShort(NEURAL,obs,INP,INP_LEN);
Code
73274 Bars 2017-12-26..2018-12-31 generated AUDUSD MTH0 | Bars 73273 | Bar 1000 | 13385.37 ms AUDUSD MTH0 | Bars 73273 | Bar 2000 | 495.60 ms AUDUSD MTH0 | Bars 73273 | Bar 3000 | 1348.97 ms AUDUSD MTH0 | Bars 73273 | Bar 4000 | 2248.71 ms AUDUSD MTH0 | Bars 73273 | Bar 5000 | 2985.90 ms AUDUSD MTH0 | Bars 73273 | Bar 6000 | 3813.51 ms ... AUDUSD MTH0 | Bars 73273 | Bar 16000 | 11858.95 ms AUDUSD MTH0 | Bars 73273 | Bar 17000 | 12596.68 ms AUDUSD MTH0 | Bars 73273 | Bar 18000 | 13511.14 ms AUDUSD MTH0 | Bars 73273 | Bar 19000 | 14189.44 ms ... AUDUSD MTH0 | Bars 73273 | Bar 37000 | 28506.39 ms AUDUSD MTH0 | Bars 73273 | Bar 38000 | 28744.40 ms AUDUSD MTH0 | Bars 73273 | Bar 39000 | 30439.84 ms
Code
avl = 0;// adviseLong (NEURAL,obl,INP,INP_LEN); avs = 0;// adviseShort(NEURAL,obs,INP,INP_LEN);
Code
AUDUSD MTH0 | Bars 73273 | Bar 27000 | 14.38380 ms AUDUSD MTH0 | Bars 73273 | Bar 28000 | 14.35420 ms AUDUSD MTH0 | Bars 73273 | Bar 29000 | 14.36570 ms AUDUSD MTH0 | Bars 73273 | Bar 30000 | 16.14190 ms AUDUSD MTH0 | Bars 73273 | Bar 31000 | 21.45670 ms AUDUSD MTH0 | Bars 73273 | Bar 32000 | 14.23840 ms AUDUSD MTH0 | Bars 73273 | Bar 33000 | 18.95120 ms AUDUSD MTH0 | Bars 73273 | Bar 34000 | 14.29470 ms AUDUSD MTH0 | Bars 73273 | Bar 35000 | 15.13100 ms AUDUSD MTH0 | Bars 73273 | Bar 36000 | 14.29760 ms
While doing this Zorro has not called anything in neural(mode = NEURAL_TRAIN), so it looks like i can't fix this?
Any Ideas?
EDIT: Ohh i think i found the reason: https:/
Quote
For NEURAL_TRAIN the Data parameter is a text string containing all samples in CSV format. The string can be stored in a temporary CSV file and then read by the machine learning algorithm for training the model.
Quote
... returned by the neural function; otherwise return 1 if no accuracy is calculated, or 0 for aborting the script when the training failed.