Forex
Google

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack (94) Thread Tools Display Modes
  41 links from elsewhere to this Post. Click to view. #41 (permalink)  
Old 12-16-2007, 09:35 AM
barnix barnix is online now
Senior Member
 
Join Date: Mar 2006
Posts: 686
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, 365 views)

Last edited by barnix : 12-17-2007 at 12:02 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #42 (permalink)  
Old 12-16-2007, 09:45 AM
barnix barnix is online now
Senior Member
 
Join Date: Mar 2006
Posts: 686
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, 122 views)

Last edited by barnix : 12-16-2007 at 10:58 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 12-16-2007, 09:48 AM
barnix barnix is online now
Senior Member
 
Join Date: Mar 2006
Posts: 686
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, 232 views)
File Type: zip svm_test_dll.zip (12.5 KB, 170 views)

Last edited by barnix : 12-16-2007 at 10:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 12-16-2007, 11:55 AM
elitecamper's Avatar
elitecamper elitecamper is offline
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!
Reply With Quote
  #45 (permalink)  
Old 12-16-2007, 12:26 PM
SHMULIK_G SHMULIK_G is offline
Junior Member
 
Join Date: Apr 2007
Posts: 9
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!
Reply With Quote
  #46 (permalink)  
Old 12-16-2007, 01:05 PM
elitecamper's Avatar
elitecamper elitecamper is offline
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 01:08 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 12-16-2007, 01:49 PM
elitecamper's Avatar
elitecamper elitecamper is offline
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!
Reply With Quote
  #48 (permalink)  
Old 12-16-2007, 02:16 PM
stef stef is offline
Junior Member
 
Join Date: Aug 2006
Posts: 9
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!
Reply With Quote
  #49 (permalink)  
Old 12-18-2007, 02:55 AM
got_fx got_fx is offline
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!
Reply With Quote
  #50 (permalink)  
Old 12-18-2007, 09:47 AM
omelette omelette is offline
Senior Member
 
Join Date: Jan 2006
Posts: 1,027
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!
Reply With Quote
Reply


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

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/expert-advisors-metatrader-4/11096-better-nn-ea-development.html
Posted By For Type Date
Profile Better - Automated Trading Championship 2007 This thread Refback 07-14-2008 11:59 AM
פורום - STRATEGY BANK This thread Refback 07-14-2008 10:19 AM
Профиль Better - Automated Trading Championship 2007 This thread Refback 07-13-2008 08:48 AM
Bogie-NN-v8 (William Boatright - Wackena) | Facebook This thread Refback 07-12-2008 07:05 AM
:: Ķ - Better's EA - Զ״ھ This thread Refback 07-07-2008 02:32 AM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 07-01-2008 06:04 PM
פורום - STRATEGY BANK Post #41 Refback 06-28-2008 09:59 PM
:: Ķ - Better's EA - Զ״ھ This thread Refback 06-26-2008 12:41 PM
פורום - STRATEGY BANK This thread Refback 06-19-2008 12:03 PM
פורום - STRATEGY BANK Post #41 Refback 06-19-2008 10:43 AM
Forex Otomatik Islem Mekanizmalar - hisse.net : Ekonomi ve Borsa Forumu Post #18 Refback 06-18-2008 03:06 PM
Комментарии - Automated Trading Championship 2007 This thread Refback 06-16-2008 06:54 PM
Fraktale , Sieci neuronowe ,Algorytmy genetyczne... This thread Refback 06-06-2008 12:41 PM
:: Ķ - Better's EA - Զ״ھ This thread Refback 06-06-2008 12:44 AM
DELPHI与热动 - 频道预览 - 抓虾 This thread Refback 06-05-2008 08:24 PM
Профиль Better - 2007自动交易锦标赛 This thread Refback 05-23-2008 10:58 PM
Profile better - Automated Trading Championship 2007 This thread Refback 05-18-2008 12:21 PM
Профиль Better - Automated Trading Championship 2007 This thread Refback 05-12-2008 05:14 PM
Better's EA - Զ״ھ - This thread Refback 05-06-2008 03:56 AM
svm dll(Example for testing the svm dll) й˹ܴҵзֲ - ˹||Ŵ㷨|ģʽʶ|Ӿ|ҵ|Ŀ This thread Refback 05-01-2008 06:31 AM
Profile Better - Automated Trading Championship 2007 This thread Refback 04-14-2008 04:18 PM
EAForex :: View topic - Combo NN This thread Refback 04-14-2008 07:14 AM
Comments - Automated Trading Championship 2007 This thread Refback 03-30-2008 07:25 AM
Sieci neuronowe na giedzie Forex - system, dyskusja This thread Refback 03-23-2008 01:59 PM
svm dll(Example for testing the svm dll) й˹ܴҵзֲ - ˹||Ŵ㷨|ģʽʶ|Ӿ|ҵ|Ŀ This thread Refback 03-14-2008 09:24 AM
פורום - STRATEGY BANK This thread Refback 03-08-2008 06:05 PM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 03-02-2008 04:09 AM
Профиль Better - 2007自动交易锦标赛 This thread Refback 02-19-2008 02:36 AM
Комментарии - Automated Trading Championship 2007 This thread Refback 02-11-2008 09:25 AM
国外有人在 究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 02-10-2008 09:06 AM
פורום - STRATEGY BANK This thread Refback 01-29-2008 05:12 PM
Automated Trading Profit: The Automated Trading Championship 2007 Is Over! This thread Refback 01-29-2008 04:19 PM
Comments - Automated Trading Championship 2007 This thread Refback 01-27-2008 04:22 PM
פורום - STRATEGY BANK This thread Refback 01-26-2008 08:04 PM
Profile Better - Automated Trading Championship 2007 This thread Refback 01-25-2008 01:36 PM
Profile Better - Automated Trading Championship 2007 This thread Refback 01-25-2008 01:36 PM
Профиль Better - Automated Trading Championship 2007 This thread Refback 01-24-2008 12:12 PM
Profile Better - Automated Trading Championship 2007 This thread Refback 01-16-2008 01:33 PM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 01-16-2008 05:51 AM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 01-15-2008 08:10 PM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 01-12-2008 04:02 PM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外汇入门,外汇论坛,外汇社区,外汇保证金,外汇交易,投资,投资论坛,A股,股票 This thread Refback 01-11-2008 10:59 PM
国外有人在研究PNN(神经EA)有点看不懂 - 「外汇交易」 - 『火线投资论坛』 外汇,外