Discussion of article "Third Generation Neural Networks: Deep Networks" - page 2

To add comments, please log in or register
jcl365
20
jcl365  

You're right with the double shifting: What the system in fact predicts is a ZZ difference that is based on the mid-price of the next bar. The ZZ is calculated from the mid-prices, but at calculation time we have the close price, which its normally about halfway between the last and the next mid-price. So the additional shifting predicts about 1.5 bars into the future, and in fact I got far worse results without the additional shift. 

I have now a Zorro script that re-trains every 4 weeks, and tests the 4 weeks following on the training. The deepnet is pretty fast, the script needs only about 10 minutes for a run covering about 60 training/test cycles. This is the result:

  

This does not look as good as the first impressions. There is clearly potential for improvement, so the next steps would be experimenting with different network setups, time periods, and different indicators.

Vladimir Perervenko
4693
Vladimir Perervenko  
We need to pick up not only the indicators but also their parameters. Gene algorithm help you.

What is Zorro? give the links?


jcl365
20
jcl365  
Vladimir Perervenko:
We need to pick up not only the indicators but also their parameters. Gene algorithm help you.

What is Zorro? give the links?


Yes, there is a book by Yu / Wang / Lai that describes a genetic algorithm for preselecting indicators for NN Forex training. - I use Zorro because scripts are simpler and backtesting is better, but I guess MT4 would do also with some effort. I can't give a link as this is a MT4 website, but you can google for Zorro trading automaton. The R dll by Bernd Kreuss works with Zorro also.
APoLLo_MQL
7
APoLLo_MQL  

I have downloaded and installed everything and put all files into the Folders. All packages are installed. Folders are set to my destinations.

When i put the expert on the EURUSD m30 Chart everything is fine even in DebugView, but as soon as i put the indicator on the Chart i get an Error:

ExecutedCode: in  >>>  as.Logical(res <-GetRes()) [1]

Error in if (z) { :

The result of the function GetRes in "i_SAE_fun.r" is always NA and so he can not convert this to bool and stops working.

Anyone can point me to the right direction? what am i missing?

Best regards,

APoLLo

Vladimir Perervenko
4693
Vladimir Perervenko  
APoLLo_MQL:

I have downloaded and installed everything and put all files into the Folders. All packages are installed. Folders are set to my destinations.

When i put the expert on the EURUSD m30 Chart everything is fine even in DebugView, but as soon as i put the indicator on the Chart i get an Error:

ExecutedCode: in  >>>  as.Logical(res <-GetRes()) [1]

Error in if (z) { :

The result of the function GetRes in "i_SAE_fun.r" is always NA and so he can not convert this to bool and stops working.

Anyone can point me to the right direction? what am i missing?

Best regards,

APoLLo

Hi APoLLo.

Which version R You have ?
This is a fairly long article and after the update packages in R some functions stop working.
Better use Revolution R Open (RRO 8.01)
To check, run a script in Rstudio.

If you have time, I also check where the error is.

Best regards/

Vladimir

Revolution R Open
  • www.revolutionanalytics.com
Revolution R Open is our enhanced distribution of the world's most widely used data analysis software. Based on open source R, Revolution R Open is built, tested and distributed by Revolution Analytics and delivers: The latest R language engine from the R Foundation for Statistical Computing High-performance R language engine (multi-threaded...
APoLLo_MQL
7
APoLLo_MQL  
Vladimir Perervenko:

Hi APoLLo.

Which version R You have ?
This is a fairly long article and after the update packages in R some functions stop working.
Better use Revolution R Open (RRO 8.01)
To check, run a script in Rstudio.

If you have time, I also check where the error is.

Best regards/

Vladimir

I am using the latest Version of R 3.2.0 64bit together with the latest MT4 build. All packages for R are downloaded yesterday so they should be latest version too.

If i start the EA on EURUSD M30 i can even connect to it with the RGUI and check for "SAE" and "prepr" and get a lot of numbers back.

For me it Looks like the GetRes function in R is checking if a Connection is open by retrieving the flag1 value which is not available on the Server (EA).

Maybe its the cause because "Acc" or "K" or "Kmax" got never calculated correct.


I have time so if you have the chance to take a look i would be very happy.

Later i will try Revolution R 8.01 to check if this works better.

Thx for you help :)

rbliuom
26
rbliuom  

Hi Vladimir

First of all thank you very much for providing so much know-how. This is realy an interesting stuff.  Not only you provided both sides ( mt4 and R-files), you explained all in detail. This is really generous.

But as Apollo befor, I 've never made the ea running, or better, that the EA as server received data from the indicator. Of course I try to find the error on my side. In R-Studio, everything work fine. Netherless I have some questions. 

in e_SAE i can find the parameter "flag". I do not find it anywhere else. Perhaps this has no meaning. But as Apollo, I have identified the GetRes -function from i_SAE_fun to make the trouble. the SAE-Indicator works , when the option " send to server" is set to false. If it is true, then nothing happens. when, after some times, I stop the indicator, and stop the RTerm in task-manager, I can see the following in dbgview: 

00000127 108.28663635 [9960] <0> GetOutput: Error: R is not running (anymore): source('C:/RData/i_SAE.r')

00000128 108.28672791 [9960] <0> GetOutput: Error: R is not running (anymore): source('C:/RData/i_SAE.r') 

00000129 108.28672791 [9960] Lade nötiges Paket: zoo 

00000130 108.28672791 [9960]  

00000131 108.28672791 [9960] Attache Paket: 'zoo' 

00000132 108.28672791 [9960]  

00000133 108.28672791 [9960] The following objects are masked from 'package:base': 

00000134 108.28672791 [9960]  

00000135 108.28672791 [9960]     as.Date, as.Date.numeric 

00000136 108.28672791 [9960]  

00000137 108.29270935 [9960] RDeinit: RHandle = 539E61C (87680540)

( This is no error) ....

but i can see in RStudio, this messages appears when sourcing i_SAE.r file. There is perhaps an problem with the "serv" parameter (?).

 

If I debug the situation with metatrader, I can see, that the ea never calculate anything.

After "return(INIT_SUCCEEDED);"  it jumps to 

102 void OnTimer() 

110 sig = GetRes(); then to

130 int GetRes()

where it goes to

if(Rgb("alert1"))

     {

      Alert("No calculation results!" + Symbol());

      sig = 0;

      return(0);

     } .

after few more steps, it jumps back to the void OnTimer 

So nothing is calculated , and never will. 

Where is the error?

I hope you have a hint , because after one week intensive analyze, I have no idea anymore.

Thank you very much for your help

regards

rbliuom 

(sorry for my english) 

Vladimir Perervenko
4693
Vladimir Perervenko  
rbliuom:

Hi Vladimir

First of all thank you very much for providing so much know-how. This is realy an interesting stuff.  Not only you provided both sides ( mt4 and R-files), you explained all in detail. This is really generous.

But as Apollo befor, I 've never made the ea running, or better, that the EA as server received data from the indicator. Of course I try to find the error on my side. In R-Studio, everything work fine. Netherless I have some questions. 

in e_SAE i can find the parameter "flag". I do not find it anywhere else. Perhaps this has no meaning. But as Apollo, I have identified the GetRes -function from i_SAE_fun to make the trouble. the SAE-Indicator works , when the option " send to server" is set to false. If it is true, then nothing happens. when, after some times, I stop the indicator, and stop the RTerm in task-manager, I can see the following in dbgview: 

00000127 108.28663635 [9960] <0> GetOutput: Error: R is not running (anymore): source('C:/RData/i_SAE.r')

00000128 108.28672791 [9960] <0> GetOutput: Error: R is not running (anymore): source('C:/RData/i_SAE.r') 

00000129 108.28672791 [9960] Lade nötiges Paket: zoo 

00000130 108.28672791 [9960]  

00000131 108.28672791 [9960] Attache Paket: 'zoo' 

00000132 108.28672791 [9960]  

00000133 108.28672791 [9960] The following objects are masked from 'package:base': 

00000134 108.28672791 [9960]  

00000135 108.28672791 [9960]     as.Date, as.Date.numeric 

00000136 108.28672791 [9960]  

00000137 108.29270935 [9960] RDeinit: RHandle = 539E61C (87680540)

( This is no error) ....

but i can see in RStudio, this messages appears when sourcing i_SAE.r file. There is perhaps an problem with the "serv" parameter (?).

 

If I debug the situation with metatrader, I can see, that the ea never calculate anything.

After "return(INIT_SUCCEEDED);"  it jumps to 

102 void OnTimer() 

110 sig = GetRes(); then to

130 int GetRes()

where it goes to

if(Rgb("alert1"))

     {

      Alert("No calculation results!" + Symbol());

      sig = 0;

      return(0);

     } .

after few more steps, it jumps back to the void OnTimer 

So nothing is calculated , and never will. 

Where is the error?

I hope you have a hint , because after one week intensive analyze, I have no idea anymore.

Thank you very much for your help

regards

rbliuom 

(sorry for my english) 

Hi rbliuom, APoLLo_MQL

This weekend I checked all scripts. The problem was in the package "svSocket."I do not know the reasons, but the data are not transmitted from the indicator to the server. I'll rewrite the expert. Simplify it. All we transferred to the expert. Now there is a lot of time, but try to finish the weekend.

Best regards

Vladimir

APoLLo_MQL
7
APoLLo_MQL  
Vladimir Perervenko:

Hi rbliuom, APoLLo_MQL

This weekend I checked all scripts. The problem was in the package "svSocket."I do not know the reasons, but the data are not transmitted from the indicator to the server. I'll rewrite the expert. Simplify it. All we transferred to the expert. Now there is a lot of time, but try to finish the weekend.

Best regards

Vladimir

Thank you Vladimir, your effort is highly appreciated :)
Vladimir Perervenko
4693
Vladimir Perervenko  
I have not forgotten his promise, but as the time is always short. Made in the near future.
To add comments, please log in or register