Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs 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
  #41 (permalink)  
Old 12-16-2007, 10:35 AM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
libsvm 2.85 for mt4:
LIBSVM -- A Library for Support Vector Machines
//open mode constants
#define READ 1
#define WRITE 2
#define READWRITE 3
//seek mode constants
#define FILE_BEGIN 0
#define FILE_CURRENT 1
#define FILE_END 2

#import "mtguru1.dll"
int gFileOpen(string file_name,int mode);
bool gFileWrite(int handle,string data);
bool gFileClose(int handle);
string gFileRead(int handle,int length=0);
void gFileSeek(int handle,int offset, int mode);
bool gFileDelete(string file_name);
int gFileSize(int handle);
int SvmScale(double,double,string, string,string);
int SvmTrain(string, string);
int SvmPredict(string, string, string);

#import

string s1[270];
string s2[2];



int xx;
int file;
//----

//initialize arrays
init_s1();
init_s2();

//initialize training file
file = gFileOpen("c:\heart.txt",WRITE); //open the file for read and write , create it if not exist
string write="";
for(int i=0;i<270;i++)
{
write=s1[i]+"\r\n";
gFileWrite(file,write); //write some date
}
gFileClose(file); //close the file

//initialize test file
file = gFileOpen("c:\heart_test.txt",WRITE);
write="";
for(i=0;i<2;i++)
{
write=s2[i]+"\r\n";
gFileWrite(file,write); //write some date
}
gFileClose(file); //close the file

xx=SvmScale(-1.0,1.0,"c:\heart.txt","c:\heart_range.txt" ,"c:\heart_scale.txt");
Print("SvmScale: ",xx);
xx=SvmTrain("c:\heart_scale.txt", "c:\heart_scale_model.txt");
Print("SvmTrain: ",xx);
xx=SvmScale(-1.0,1.0,"c:\heart_test.txt","c:\heart_test_range.t xt" ,"c:\heart_test_scale.txt");
Print("SvmTestScale: ",xx);
xx=SvmPredict("c:\heart_test_scale.txt", "c:\heart_scale_model.txt","c:\heart_predict.txt") ;
Print("SvmPredict: ",xx);

file = gFileOpen("c:\heart_predict.txt",READ);
string s1=gFileRead(file,3); //
string s2=gFileRead(file,3); //
gFileClose(file); //close the file
int classify1=StrToInteger(s1);
int classify2=StrToInteger(s2);

Comment("c1=",classify1," c2=",classify2);
Attached Files
File Type: zip mtg1.zip (1.34 MB, 578 views)

Last edited by barnix; 12-17-2007 at 01:02 AM.
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
  #42 (permalink)  
Old 12-16-2007, 10:45 AM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
The libSVM 2.85 (original and mt4 version) was tested with the following example:
LIBSVM -- A Library for Support Vector Machines
Heart Statlog heart disease data is a small dataset with 270 cases and 13 variables and the class variable.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
This dataset is about detecting heart disease.

Variables

The data consists of the following 13 variables and a class variable:
0.Class Absence or presence of heart disease: absence, presence
1. Age: numerical
2. Sex: male, female
3. Chest pain type: 1, 2, 3, 4
4. Resting blood pressure: numerical
5. Serum cholestoral in mg/dl: numerical
6. fasting blood sugar > 120 mg/d: yes, no
7. Resting electrocardiographic results: 0, 1, 2, 3
8. Maximum heart rate achieve: numerical
9. Exercise induced angina: yes, no
10. ST depression induced by exercise relative to rest: numerical
11. The slope of the peak exercise ST segment: numerical
12. Number of major vessels colored by flourosopy: 0-3
13. Thal: normal, fixed defect, reversable defect

================================================== ==
0.Class=+1,-1
1:70.000000
2:1.000000
3:4.000000
4:130.000000
5:322.000000
6:0.000000
7:2.000000
8:109.000000
9:0.000000
10:2.400000
11:2.000000
12:3.000000
13:3.000000
Attached Files
File Type: txt heart.txt (41.7 KB, 191 views)

Last edited by barnix; 12-16-2007 at 11:58 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
  #43 (permalink)  
Old 12-16-2007, 10:48 AM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Data files created with original libsvm 2.85
and mtguru1.dll
Attached Files
File Type: zip svm_test.zip (199.0 KB, 378 views)
File Type: zip svm_test_dll.zip (12.5 KB, 295 views)

Last edited by barnix; 12-16-2007 at 11:04 AM.
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
  #44 (permalink)  
Old 12-16-2007, 12:55 PM
elitecamper's Avatar
Senior Member
 
Join Date: May 2007
Posts: 132
elitecamper is on a distinguished road
I think in the end filters r more powerful than NN's
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
  #45 (permalink)  
Old 12-16-2007, 01:26 PM
Junior Member
 
Join Date: Apr 2007
Posts: 10
SHMULIK_G is on a distinguished road
I have a Q

Hi
there is alot of companies that started to sell a NN tools..
4 exemple :
NeuralTools, Statistical Analysis Software - Palisade Europe
what is it good for? Do we need that? can we get that for free on the net ,or its worthy to pay for...>@?

Lets get the exp opinion...

have a nice day.
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
  #46 (permalink)  
Old 12-16-2007, 02:05 PM
elitecamper's Avatar
Senior Member
 
Join Date: May 2007
Posts: 132
elitecamper is on a distinguished road
Quote:
Originally Posted by SHMULIK_G View Post
Hi
there is alot of companies that started to sell a NN tools..
4 exemple :
NeuralTools, Statistical Analysis Software - Palisade Europe
what is it good for? Do we need that? can we get that for free on the net ,or its worthy to pay for...>@?

Lets get the exp opinion...

have a nice day.

Most companies that sell NN software, push back propagation networks the most, and I consider them useless, they learn to predict the next incoming bar, they are over fitted, illogical and non-linear. This type of network does very little for trading markets, and they're the most difficult to train and configure as well. Stay away from back propagation, its not the way. there are superior NN solutions for trading.

Before you spend a couple hundred dollars on neural network software make sure you know about neural networks first. The subject has a steep learning curve, there is a lot of misinformation out there. learn about the different network models and what their use is for. Also try the software trials all vendors have them, and I recommend the networks that learn and adapt on their own. The networks that require extensive training are the ones that over fit. Using networks only to predict the next bar is an approach to avoid. Seek networks that enhance trend and cycle identification. These networks behave more like filters.

Last edited by elitecamper; 12-16-2007 at 02:08 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
  #47 (permalink)  
Old 12-16-2007, 02:49 PM
elitecamper's Avatar
Senior Member
 
Join Date: May 2007
Posts: 132
elitecamper is on a distinguished road
I don't agree on the probabilistic NN theory. Thats over complicated on a TF with too much noise.

It's more along the lines of support vector regression, you touched it barnix.
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
  #48 (permalink)  
Old 12-16-2007, 03:16 PM
Junior Member
 
Join Date: Aug 2006
Posts: 11
stef is on a distinguished road
i am ok with you EliteTrader, Support Vector Machine is more powerfull than class NN
thanks to Barnix , for all the PDFs and information
I will be glad to work in your team ...
today i work alone, and there are two much ideas to study ... before finding a system like Better's EA

incredible results of Better !!
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
  #49 (permalink)  
Old 12-18-2007, 03:55 AM
Junior Member
 
Join Date: Dec 2005
Posts: 6
got_fx is on a distinguished road
I just thought that I should share my 5cc worth...
I've played a bit with NN's, SVM's, tree ensambles and other bizarre algs (see Flexible Neural Trees Ensemble for Stock Index (ResearchIndex)). (it works for standard problems but I did not develop it to the fullest realizing that I am spending too much time on the algorithm itself).
The key is not in the learning algorithm but rather than that in the predictors.
It took me quite a bit of wasted time to realize this. We cannot expect to find dependencies in data that has none.
One cannot predict the next bar. It's impossible and naive. We can try to capture patterns though. There was a post on Better's board stating the his approach had captured the market cycles. This was from a guy who claims to have experimented with NNs a lot (tried to find the post but couldn't, maybe it was in Russian, which I understand a bit) and I totally agree with him.
I'll give you a hint - think about MACD and try to predict the position of the next extremum (min or max) - an idea that I never really exploited meaningfully because of the little hurdles along the way (proper filtering).

I was fascinated in the past by modern machine learning algs but the truth is, once again, what we are actually trying to do. It's coming with the right approach.

BTW, libsvm is perhaps the best developed one out there but it did not give me the best results. Check mysvm and svmlight.
As for NNs, I mostly trust rbf nets as they tend to catch pockets of data very well. Those who know what a rbf is will understand. Properly configuring those (some sort of clustering first...) and training them is a pain.

I had abandoned the addiction called forex but now I am glad I found this thread.
Maybe we can make a team and really thoroughly work out the problem.
I've always believed that the solution is somewhere in the open but alas, could not find it by myself.
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
  #50 (permalink)  
Old 12-18-2007, 10:47 AM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
I really don't know much about NN's but I do recall reading a year or so ago, that the Support Vector Machine idea was seen then as the most promising in AI cognitive fields (distinct from financial forecasting). Does anyone know of any commercial packages that employ these?
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
better ea, neural network, svm forex, cache:Jtu9ppOwDvsJ:www.forex-tsd.com/expert-advisors-metatrader-4/11096-better-nn-ea-development.htm, better, nn ea, better ea development, forex better ea, cortex, forex, Better NN EA, better development, better NN development, wackena NN-EA, libsvm, ea better, kalman, auto-scalper, Forex Auto-Scalper, search, Abdul Rahman EA Forex, fapturbo, betterea, GaussPNN, neuro, MT4_FANN, Auto-Scalper.ex4, better nn, Matrix NN ea


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
BrainSystem: indicators development newdigital Brain Systems 58 08-22-2009 09:52 PM
Zigzag system development newdigital Indicators - Metatrader 3 14 05-20-2009 05:52 AM
StochThreshold | ... under development wibitiens Indicators - Metatrader 4 0 05-26-2007 03:26 AM
Brainwashing: system development newdigital Brain Systems 45 11-24-2006 12:55 PM
Help with simple EA idea development Spider4896 Metatrader 4 2 04-21-2006 02:23 PM


All times are GMT. The time now is 10:41 AM.



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