Forex



Go Back   Forex Trading > Forex Press > Analytics
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #141 (permalink)  
Old 03-23-2009, 01:50 PM
Junior Member
 
Join Date: Jul 2008
Posts: 24
Kazam is on a distinguished road
I can't tell anything looking at the pictures because there might by a "shadow effect" and the pictures are to small to tell that.

But I can tell you how to check if the NN is ok. Export /there is an export and an import wizard in Matlab/ the testing output to a XLS or CSV file /Excel file/. Then put the real values next to the NN output and in the next column put a formula that checks if the NN predicted the correct direction of price movement.

By counting how many "1" you get you'll know the accuracy of the network.

The you may write a formula that calculates the profit and loss for every step. Look at he picture below /I'm using Polish version of Excel so I don't know if I got the formulas right /. Skip the spread for now.
Attached Images
File Type: jpg Clipboard01.jpg (21.2 KB, 378 views)

Last edited by Kazam; 03-23-2009 at 01:53 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #142 (permalink)  
Old 03-23-2009, 03:33 PM
biddick's Avatar
Senior Member
 
Join Date: Mar 2009
Posts: 127
biddick is on a distinguished road
Hi Kazam,

İs it possible to implement this NN package to Metatrader?
Attached Files
File Type: zip example.zip (105.6 KB, 77 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #143 (permalink)  
Old 03-23-2009, 03:41 PM
Member
 
Join Date: Feb 2009
Posts: 86
mrwobbles is on a distinguished road
Looks like it might be okay, I ran the formula through Open Office spreadsheet and it returned 73% accuracy on trade direction. Still got a few more inputs to give the network that I think will improve accuracy. Here's the spreadsheet, I saved it in xls format, you should be able to read it.
Attached Files
File Type: rar GJ60.rar (830.3 KB, 106 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #144 (permalink)  
Old 03-23-2009, 05:41 PM
SIMBA's Avatar
Senior Member
 
Join Date: May 2006
Posts: 1,398
SIMBA is on a distinguished road
In sample ,out of sample

Quote:
Originally Posted by mrwobbles View Post
Looks like it might be okay, I ran the formula through Open Office spreadsheet and it returned 73% accuracy on trade direction. Still got a few more inputs to give the network that I think will improve accuracy. Here's the spreadsheet, I saved it in xls format, you should be able to read it.
Good...In sample or Out of sample?
Big difference it will make in your account,73% In sample is an account killer,73% out of sample is a maybe...

Try to believe only the out of sample results,and the less inputs you have ,the less overfitting you will get...so,if you add new inputs,think about deleting some of the old ones ..or expand the out of sample dataset on which you will forge your beliefs

As a rule of thumb: Less inputs,less connections,more out of sample points...better generalization.

Regards
Simba
__________________
Equo ne credite,Teucri.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #145 (permalink)  
Old 03-23-2009, 06:16 PM
Junior Member
 
Join Date: Jul 2008
Posts: 24
Kazam is on a distinguished road
biddick

It's a DLL so have a look here:

Code:
http://www.metatrader.info/node/150
There's an example of how to use DLL functions in Metatrader.

mrwobbles

It's either the training data or you got something wrong - the results are to good .

If one could get an accuracy of 73% with a simple back propagation network no one would give a shit about more complicated stuff

SIMBA

You're right. Choosing the proper input is a the most important thing in the process of creating a NN /there's a rule "trash goes in, trash comes out" /.

But you can always use data mining tools to analyze many different variables and choose those that affect the one you want to predict.

There's a nice book about data minig /and about genetic algorithms, Bayesian classification etc./ - "Data Mining Methods and Models." by Daniel T. Larose. It also shows how to use WEKA /a free, open source software for machine learning/.


My preferred way is to use GA - for the propose of time series prediction I usually allow them to choose from 15-40 previous steps.


PS

I've mentioned using Bayesian probability for the classification tasks but it can also be used for time series prediction

Code:
http://www.cis.hut.fi/juha/papers/ESTSPfinal.pdf

Last edited by Kazam; 03-23-2009 at 06:42 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #146 (permalink)  
Old 03-23-2009, 11:18 PM
Member
 
Join Date: Feb 2009
Posts: 86
mrwobbles is on a distinguished road
Simba what do you mean by out of sample? I tried building another network with about 6 more inputs and that reduced the accuracy. I think I've got a good set of inputs. It's based on my trading strategy which works well in trending markets and poorly in ranging markets. This makes sense with the predictions as well. The two long ranges at the top and bottom of the chart are where the predictions start to falter. I think some work on ranging strategies could turn up some useful inputs.

Kazam, this is the code used to create the network. To me that says create a new feed-forward back prop network. I'm not sure why it's churning out good results either it seems a little too good to be true. I summed the values of correct pips minus incorrect pips and over that period (about 30 months) it would have profited 294873 pips... I'm scared

numHiddenNeurons = 13;
net = newff(p,t,numHiddenNeurons);

Last edited by mrwobbles; 03-23-2009 at 11:27 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #147 (permalink)  
Old 03-23-2009, 11:33 PM
Junior Member
 
Join Date: Jul 2008
Posts: 24
Kazam is on a distinguished road
mrwobbles

Out of the sample means checking how the NN works with data different from the one it wast trained on. In the sample means opposite.

The code is ok. Are you sure you don't use as input and target data in the same time step /input[x1(t0), x2(t0), ..., xn(t0)], output[y(t0)]/?

Some more papers I found in my bookmarks /the first one should be really interesting for you/:

Code:
http://www.softcomputing.net/isnn06-02.pdf

http://www.chaos2008.net/zzProceedings/CHAOS2008%20(D)/PAPERS_PDF/Atsalakis_Nezis_Skiadas-Forecasting_Chaotic_time_series_by_a_Neural_Network.pdf
I also decided that in 3-4 weeks time I'll try to build a ENN capable to predict exchange rates at the D1 and maybe H4 time frames. I think I'll tart with combination of FNT, GEP and PSO and then try to improve the ENN using PIPE instead of GEP, EPSO, Simulated Annealing etc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #148 (permalink)  
Old 03-24-2009, 12:36 AM
Member
 
Join Date: Feb 2009
Posts: 86
mrwobbles is on a distinguished road
Thats what I figured but no it was trained on a 7 year chunk from 1999 to 2006 and then simulated on data from then till now. So it was out of sample.

But that might explain it. It could well be trying to predict the current high/low and close rather than the next hour . I'll have a look at the date stamps and see. Thanks for the links will have a look see.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #149 (permalink)  
Old 03-24-2009, 09:30 PM
Member
 
Join Date: Feb 2009
Posts: 86
mrwobbles is on a distinguished road
Yeah turns out I was feeding it input and target data from the same hour rather than input from current hour and target from the next. I trained the network on the same inputs but with the targets from the next hour and the results are more what I was suspecting. It was accurate on direction about 51% of the time and recorded about 10,000 pips over 30 months. I normalized the inputs to [-1,1] and this improved the performance marginally. Gonna try a few different network model. Have been looking at time-delayed networks, thou the flexible neural tree approach does seem more and more appealing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #150 (permalink)  
Old 03-25-2009, 12:41 AM
Junior Member
 
Join Date: Jul 2008
Posts: 24
Kazam is on a distinguished road
mrwobbles

Skip TDN's.

You should be only interested in 3 types of networks:

- Flexible Neural Trees - designed with the use of either GP, GEP, PIPE or ECGP and fine tuned with the use of Simulated Annealing, PSO, EPSO, Ant Algorithms, Artificial Immune System Algorithm etc.
- Bayesian Networks - either for time series prediction or for building a trading system
- HONN's

For building a trading system you may also find useful:

- RIPPER algorithm - someone used it an EA made for Automated Trading Championship if I remember correctly
- C4.5/C5.0

You don't need anything more and anything less /as for now/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
cortex, forex, forex matlab, forex neural network, forex neural networks, forex_nn_ind_juna, Forex_Nn_Ind_juna.mq4, joone forex, matlab forex, mql4 neural network, NEURAL, neural forex-tsd, neural mq4, neural net, neural network, neural network forex, neural network forex indicators, neural networks, neural networks forex, neuroproba, neuroshell


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Big Maths program with Financial / Neural / Statistical Functions...... De Vinci Tools and utilities 3 10-12-2007 07:28 AM
Neural Forecast for Eurusd on 2006 De Vinci Tools and utilities 2 06-08-2006 04:27 AM
Alyuda Forecaster XL 2.13 ( Neural prog for Excel - US version ) De Vinci Tools and utilities 0 11-11-2005 11:29 AM


All times are GMT. The time now is 09:48 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.