Download MetaTrader 5

Discussion of article "Deep neural network with Stacked RBM. Self-training, self-control" - page 3

To add comments, please log in or register
Vladimir Perervenko
3808
Vladimir Perervenko  
lord_hiro:

Hello Vladimir,

I'm able to run the EA in backtest but it seems to perform only the first pass.

In the attached file you can find the output of both tester and debugview.

Can you please help?

Thanks,

Diego 

Hi Diego,

To start an expert in the tester MT4, you want to transfer the executable part of the expert OnTimer () in OnTick (). OnTimer() in the tester does not work

The tester will start testing all the ticks. And of course, use the version 0.10

Best regards

Vladimir 

lord_hiro
50
lord_hiro  

Thank you all!

When I did the test darch was already v0.10.0 and the code had been moved from OnTimer() to OnTick as suggested.

I've tried both MRO and CRAN R 3.3.1 (same packages versions on both distros) and they crashed in the same way.

Could it be related to the history, to its granularity, gaps and so on? I was testing H1 EURUSD so to be reasonably sure to avoid those problems indeed.

Any other idea and suggestion would be very welcome :-D !

williamwong
731
williamwong  

My version crashed in testing as well because of the following function:

form.data <- function(n = 16, z = 37, len = 500){
   require(magrittr)
   x <- In(p = n)
   out <- ZZ(ch = z, mode = "m")
   data <- cbind(x, y = out[ ,2]) %>%
  as.data.frame %>% head(., (nrow(x)-len))%>%
  na.omit
   data$y <- as.factor(data$y)
   return(data)
 }

By default it cuts away the last 500 rows.  The tester passed in data containing only 100 rows, hence R crashed with the following:

[48388] Attaching package: 'dplyr'
[48388
[48388] The following objects are masked from 'package:stats':
[48388
[48388]     filter, lag
[48388
[48388] The following objects are masked from 'package:base':
[48388
[48388]     intersect, setdiff, setequal, union
[48388
[48388] Loading required package: TTR
[48388] Error in sample.int(length(x), size, replace, prob) :
[48388]   vector size cannot be NA/NaN
[48388] Calls: source ... <Anonymous> -> factorsample -> sample -> sample.int
[48388] Execution halted

Questions:

1.  Why form.data removes the last 500 rows?  Perhaps it is not required during testing to remove last 500 rows?

2.  how many rows of price data needed to pass in for it to function properly?  Perhaps I should add checks in the expert to ensure sufficient history is passed in. 

When I changed the code not to remove last 500 rows, the expert went through the testing without problem.  This was for SAE.

williamwong
731
williamwong  
When I tried RBM, createDataSet failed.  This function is not anywhere in the source?  Is there something I miss out?
Vladimir Perervenko
3808
Vladimir Perervenko  

williamwong:
Когда я попытался УОР, CreateDataSet не удалось. Эта функция не где - нибудь в исходном коде? Есть что - то я пропустить?

====================================== 

Скрипты написаны с применением пакета darch (v. 0.10.0). В новой версии (0.12.0) пакета darch эта функция не применяется. Я посмотрю, что можно сделать.

 

 

 

Akos Kiss
14
Akos Kiss  

Hi Vladimir

Thank you for the great articles, have you any idea,  is there an opportunity to use the old (v 0.10.0) version of the darch package?  It would be a good solution to the issue of CreateDataSet function...

Best regards

Akos 

Vladimir Perervenko
3808
Vladimir Perervenko  
Akos Kiss:

Hi Vladimir

Thank you for the great articles, have you any idea,  is there an opportunity to use the old (v 0.10.0) version of the darch package?  It would be a good solution to the issue of CreateDataSet function...

Best regards

Akos 

==========================================================

Решение этой проблемы возможно применением пакета  "checkpoint". после 5 января напишу решение.

lve0200
79
lve0200  

Dear Vladimir, you wrote:

The main reasons for the fall Rterm:

- Lack of the necessary libraries

- Loaded libraries of more recent versions are not compatible with the script.

I managed to fall back to darch 0.10.0, which solved a few problems. However it still crashes w/ following error:

Attache Paket: 'dplyr'  
00000111        17.03886032     [13652]        
00000112        17.03886032     [13652] The following objects are masked from 'package:stats':  
00000113        17.03886032     [13652]        
00000114        17.03886032     [13652]     filter, lag        
00000115        17.03886032     [13652]        
00000116        17.03886032     [13652] The following objects are masked from 'package:base':  
00000117        17.03886032     [13652]        
00000118        17.03886032     [13652]     intersect, setdiff, setequal, union        
00000119        17.03886032     [13652]        
00000120        17.03886032     [13652] Load packet: TTR        

00000121        17.03886032     [13652] Error in vector(length = size) : invalid 'length' Argument  "vector size cannot be NA"

00000122        17.03886032     [13652] Ruft auf: source ... prepareTrain -> <Anonymous> -> factorsample -> vector      

00000123        17.03886032     [13652] Ausführung angehalten   (execution stopped)
00000124        17.10515022     [13652] exception E06D7363 at 76D1A832 in C:\WINDOWS\System32\KERNELBASE.dll -> EXCEPTION_CONTINUE_SEARCH      
00000125        17.11113167     [13652] <-1> TPlotEventLoop: terminating        

Could you please publish a list of crucial package versions, on which the code runs, - confirmed.

There are numerous newer packages around, as those, on which you have constructed your code! Both, either executing your code, or manually installing packages will ALWAYS install the latest release, on which your code is NOT executable, e.g. darch 0.12.0.

Best Regards and happy 2017

hk


on the DNSAE package, I get the same error as described on post #23

lve0200
79
lve0200  

to whom it may concern,


here is a description, how to install older packages on R, e.g. darch 0.10.0 instead of 0.12.0.


https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages


Rgds

hk


Installing older versions of packages
Installing older versions of packages
  • 2016.10.06
  • support.rstudio.com
You may need to install an older version of a package if the package has changed in a way that is incompatible with the version of R you have installed, or with your R code. You may also need to use an older version of a package if you are deploying an application to a location such as shinyapps.io, Shiny Server , or RStudio Connect where the...
lve0200
79
lve0200  
williamwong:

My version crashed in testing as well because of the following function:

form.data <- function(n = 16, z = 37, len = 500){
   require(magrittr)
   x <- In(p = n)
   out <- ZZ(ch = z, mode = "m")
   data <- cbind(x, y = out[ ,2]) %>%
  as.data.frame %>% head(., (nrow(x)-len))%>%
  na.omit
   data$y <- as.factor(data$y)
   return(data)
 }

By default it cuts away the last 500 rows.  The tester passed in data containing only 100 rows, hence R crashed with the following:

[48388] Attaching package: 'dplyr'
[48388
[48388] The following objects are masked from 'package:stats':
[48388
[48388]     filter, lag
[48388
[48388] The following objects are masked from 'package:base':
[48388
[48388]     intersect, setdiff, setequal, union
[48388
[48388] Loading required package: TTR
[48388] Error in sample.int(length(x), size, replace, prob) :
[48388]   vector size cannot be NA/NaN
[48388] Calls: source ... <Anonymous> -> factorsample -> sample -> sample.int
[48388] Execution halted

Questions:

1.  Why form.data removes the last 500 rows?  Perhaps it is not required during testing to remove last 500 rows?

2.  how many rows of price data needed to pass in for it to function properly?  Perhaps I should add checks in the expert to ensure sufficient history is passed in. 

When I changed the code not to remove last 500 rows, the expert went through the testing without problem.  This was for SAE.

Hi,


i've got hte same probs as you did. Reading your post, I have a few questions, due to my lack of experience in this domain:

I cannot see any connection between the debug error output

Error in sample.int(length(x), size, replace, prob) :
[48388]   vector size cannot be NA/NaN

[48388] Calls: source ... <Anonymous> -> factorsample -> sample -> sample.int

and the function, where you have located the actual error?

form.data <- function(n = 16, z = 37, len = 500){...-

You say, you have changed the code and made it run.

How did you do this??


Thank you

hk

To add comments, please log in or register