Build Neural Network Indicator in MT4 using Neuroshell

This is a discussion on Build Neural Network Indicator in MT4 using Neuroshell within the Trading Software forums, part of the Commercial category; Develop a Neural Network based indicator has some advantages: - Indicator may consist of a predicted values, as a leading ...

Reply
 
LinkBack Thread Tools Search this Thread
Old Jan 20, 2010, 9:12am   #1
Joined Feb 2008
Build Neural Network Indicator in MT4 using Neuroshell

Develop a Neural Network based indicator has some advantages:
- Indicator may consist of a predicted values, as a leading indicator.
- This leading indicator will be useful prior placing any trade
- Neural network training can be performed using available softwares (freeware and commercial are available).
- the trained NN can be implemented as indicator in Metatrader either written neural configuration (weight) or calling the dll.

As a sample of NN implementation, I found the following link as the starting point: http://forums.babypips.com/57970-post1.html
Here I attached all file discussed on above link, basic idea to create the neural net is explained on the file (description.doc).

Using the same idea, I use Neuroshell to train the neural network and implement it in MT4 to create the indicator.

The following steps to build the NN:
1. Prepare the training data,i.e. consist of inputs and outputs for NN. Using MT 4 script to collect the data. Input can be indicators available in MT4 such as EMA, RSI, CCI, WPR etc. The output can be predicted EMA, Close, etc which useful for our trading depend on the NN strategy (back propagation, kohonen, PNN, GRNN, or GMDH).
2. Train the network using neuroshell:
- Create new problem
- Advanced NN: loading the data, define input/ouput, extract data (training and testing), design NN to choose NN strategy, create the dll using run time facilities.
3. Copy the created dll into MT4 folder.
4. Create MT4 indicator which consist of: dll file link definition, NN initiation OpenNet (in MT4 init function), calculate the indicator using FireNet and CloseNet (in MT4 deinit function). FireNet is used to firing the neural network using inputs as defined while preparing the data to get the NN output (predicted data).
5. Improving indicator, in my attachment I use moving average and comparison between the output net to generate trading signal and classifier indicator.
6. Converting MT4 indicator to expert advisor (I need some one to help me to create the EA based on created indicators).

The original MT4 files should been modified due to the format data required on
Neuroshell is different.

Attachment explanations:
- Description.doc (brief description from the originator)
- Data collection script.zip (sample code to collect data)
- Indicator, met file, template including instruction (in zip)
- aa Neurotred.jpg (indicator produced based on Neuroshell dll)
- Neuro Trend Classifier 4H.jpg (improved indicator)

Any advice is highly appreciated.
Cheers,
Arryex
Attached Thumbnails
aa-neurotrend.jpg   neuro-trend-classifier-4h.jpg  
Attached Files
File Type: doc Description.doc (428.5 KB, 6848 views)
File Type: zip Data collector script.zip (43.0 KB, 3163 views)
File Type: zip Indicators & instruction.zip (21.1 KB, 3530 views)

Last edited by arryex; Jan 20, 2010 at 8:07pm.
arryex is offline   Reply With Quote
Thanks! The following members like this post: Charlton
Old Jan 20, 2010, 6:16pm   #2
 
2 Posts
Joined Dec 2008
Re: Build Neural Network Indicator in MT4 using Neuroshell

Dear Sir Arry,

Could you explain how to use data sets training creator as you attached above? and how it works.

Thank you
fx1st is offline   Reply With Quote
Old Jan 20, 2010, 8:21pm   #3
Joined Feb 2008
Re: Build Neural Network Indicator in MT4 using Neuroshell

arryex started this thread Hi,
I just uploaded the indicator file, net file and instruction to use them.

To use a script file, you should copy NeuralTrainingsetCreator.mq4 (and ex4) into folder
..\experts\script\, to use it expand the +script from navigator MT4 terminal, double click the file. You need to close and reopen MT4 if you can't see it.

The format data file is suitable for SNNS or JNNS (http://www.ra.cs.uni-tuebingen.de/SNNS/) which free downloaded. It is cheapest solution if you do not have
any commercial software to train your NN.

Other freeware is BMP that you can download from dit.ipg.pt/MBP/. All software and tutorial can be downloaded as well.

Sorry I could not tell more about SNNS or BMP since I am not use it extensively rather than Neuroshell, but I am sure it will help you much to learn neural network.

Good luck
arryex is offline   Reply With Quote
Old Jan 20, 2010, 8:35pm   #4
Joined Feb 2008
The 2nd Indicator

arryex started this thread I wish to predict 5 bar of High and Low in advance. The preparation done as the following:
1. Network Design
- input NN:
High(t), High(t+1), High(t+2), High(t+3), High(t+4), High(t+5),
Low(t), Low(t+1), Low(t+2), Low(t+3), Low(t+4), Low(t+5),
Close(t), Close(t+1), Close(t+2), Close(t+3), Close(t+4), Close(t+5)

- Output NN:
High(t-1), High(t-2), High(t-3), High(t-4), High(t-5) for Network 1
Low(t-1), Low(t-2), Low(t-3), Low(t-4), Low(t-5) for Network 21

- Network architecture:
3 hidden slabs, with 38 neurons, input slab with 15 neurons and output slab with 5 neurons.
Learning rate, momentum, and initial weight using default values
Pattern selection: rotation, Weight updates: Turboprop, Save training: best test set, event since min. avg. error=1,000,000.

2. Data preparation (using MT4 script, in csv format) to collect all required inputs and outputs.

3. Training performed, transfer created dll into MT4 folder.
4. Use the indicator.

Any other ideas are appreciated.

Cheers
Attached Thumbnails
aaneural-predict-high-low.jpg  
arryex is offline   Reply With Quote
Old Jan 20, 2010, 8:55pm   #5
 
Pat494's Avatar
Joined Mar 2004
Re: Build Neural Network Indicator in MT4 using Neuroshell

Please excuse my ignorance but are you saying your NN will predict (rightly/wrongly) 5 bars in advance ?
__________________
Imagination is more important than knowledge.
Einstein
Pat494 is offline   Reply With Quote
Old Jan 21, 2010, 12:25am   #6
Joined Feb 2008
Re: Build Neural Network Indicator in MT4 using Neuroshell

arryex started this thread Yes, regardless the quality of prediction (right or wrong), the intention is to next 5 bar high and low price (the next price range).

I have been inspired by the following article
http://www.tradetrek.com/Education/w...n5forecast.asp

I think the quality of neural network prediction will be based on inputs, outputs and the neural network it self. Any other influence such as fundamental news announcement is not part of this NN input, hence we can not expect that the price range will be valid when the fundamental news announced.

Cheers
arryex is offline   Reply With Quote
Old Jan 21, 2010, 1:26pm   #7
 
Pat494's Avatar
Joined Mar 2004
Re: Build Neural Network Indicator in MT4 using Neuroshell

Which NNs do you find are best forecasters ?

I have found general regression and combined adaptive time ones are best.
Although the former are a bit wilder and the latter a bit slower.
__________________
Imagination is more important than knowledge.
Einstein
Pat494 is offline   Reply With Quote
Old Jan 21, 2010, 1:51pm   #8
 
Pat494's Avatar
Joined Mar 2004
Re: Build Neural Network Indicator in MT4 using Neuroshell

Quote:
Originally Posted by arryex View Post
Yes, regardless the quality of prediction (right or wrong), the intention is to next 5 bar high and low price (the next price range).

I have been inspired by the following article
http://www.tradetrek.com/Education/w...n5forecast.asp

I think the quality of neural network prediction will be based on inputs, outputs and the neural network it self. Any other influence such as fundamental news announcement is not part of this NN input, hence we can not expect that the price range will be valid when the fundamental news announced.

Cheers
Had a look at tradetrek.
Seems that they are closing the equity side to concentrate on Forex.
NNs imho aren't quite up to speed yet. But this will change as markets become more and more predictable with better technology. Ultimately ceasing to exist.
__________________
Imagination is more important than knowledge.
Einstein
Pat494 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Neuroshell Cluster Indicator > Comments? Skyhr Forex 6 Nov 25, 2014 12:25pm
MTFeed Pro Neuroshell MT4 Input Orders Problem eurgbp Trading Software 3 Mar 24, 2010 3:13pm
Neural Network indicator - Any potential users? Flo_UniS Forex 5 Jan 15, 2009 8:27am
Neural Network Trading Models gs2004 Educational Resources 7 Sep 23, 2005 11:40pm

Currently Active Users Viewing This Thread: 6 (0 members and 6 guests)