0% found this document useful (0 votes)
139 views2 pages

Implement Neural Network in MT4

Como intergral MT4 a una red neuronal

Uploaded by

clarod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views2 pages

Implement Neural Network in MT4

Como intergral MT4 a una red neuronal

Uploaded by

clarod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Implement Neural Network in MT4

© Arryex, Feb 2012

1. Plan your idea, what symbol, from where data will be collected (broker), time frame, software
that will be involved, select prediction/classification target (output) and inputs, data range, etc.
2. Collect Data:
a. Manual Export from MT4 History Center (F2)
b. Create Indicator, expert advisor or script to export data from MT4

Data shall consist of all inputs and outputs data. Inputs can be indicators value available in MT4
and output is the target of neural network prediction/classification. Most of time, output can be
future indicator values, such as 10 bar in advance of moving average, percent change, optimal
Buy and Sell, etc.
Data shall be in ASCII format (csv, txt, dat, etc) that can be read by the Neural Network software.
Select the data range for neural network training, it should consist of all market condition:
uptrend, downtrend and sideway.
Verify any error in data, since it will impact the network quality.
3. Train Neural Network
a. Copy the training data into Neural Network working folder
b. Split data into: optimization, validation and production (out of sample). Percentage can
be 70% (O), 20% (V), 10% (P) or others.
c. Run the optimization using any available training algorithm
d. Verify the result (based on R‐squared, MSE, %direction, correlation, etc)
e. Select the best neural network model
f. Save the trained neural network data (weight factors, bias, neural network
configuration, etc). Some software offering dll server/wrapper, source code generator
into C, visual basic, etc.
4. Deploy Neural Network into MT4
a. Using Dll Server, such as .def file in NS2, .md file in CH, etc.
b. Using source code generator in C, VB or FLA that consist of all information about trained
neural network (weight factor, bias, formula that showing relation between inputs and
outputs). Using this code we can create a dll file or convert the code into mq4.
c. Create indicator to call trained neural network file (.def, .md or dll).
d. Create Expert Advisor to implement the trained net trading system.

Useful Neural Network Software:


Non commercial: JNNS, Cortex, etc
Commercial: Brainmaker, Neuroshell 2, Chaoshunter, Matlab, Neurosolutions, Biocomp, Peltarion,
WinSom, DTreg, Eudaptic, Palisade, etc
Sample files (data and codes in NS2, CH, NSPred and Neuroshell):
aa_dcs_neurotrend17i.mq4 script to export neurotrned train data in MT4 into csv file
aaneurotrend17idata.csv train data file
ns2train.zip NS2 training file (csv, .dsc, .i0x, .n0x, mmx, trn, fig, out)
aaNeuroTrend17i.def trained net from Neuroshell 2 for dll server deployment mode
aaNeuroTrend17i.c trained net c code from Neuroshell 2
aaNeuroTrend17i.vb trained net vb code from Neuroshell 2
aaNeuroTrend17i.fla trained net fla code from Neuroshell 2
aa_dcs_neurotrend17i.mq4 script to export inputs‐output data for aaneurotrend indicator
aaNeuroTrend17i.dll compiled c code
aaneurotrend.mq4 indicator aaneurotrend using dll server (require NS2‐32.dll)
aaneurotrenddll.mq4 indicator aaneurotrend using compiled c to dll
aaneurotrend.xls implementation NS2 trained net in excel
aaNeuroTrend17imat.mq4 implementation Matlab trained net

chneurotrend.zip CH training file (csv, md, work)


aaCHneurotrend.mq4 indicator neurotrend based on CH equation
aaCHmdneurotrend.mq4 indicator neurotrend based on CH model (wrapping dll)
aaCHneurotrendsig.mq4 neurotrend signal based on CH model
aaCHneurotrend.xls implementation CH model in excel

aaNeuroTrend17inn.net trained net from Neuroshell Predictor neural network mode


aaNeuroTrend17iga.net trained net from Neuroshell Predictor genetic algorithm mode
aaNSpredneurotrend.mq4 indicator neurotrend based on NSPredictor model
aaGHneurotrend.xls implementation NSPred trained net in excel and
reoptimization using GeneHunter

xauusdneurotrend.cht Neuroshell Trader implementation of aaneurotrend (from


NS2, NSPred and CH)
vsneurotrend.zip visual studio code for creating dll

trainbfg.m create neural network in matab using quasi newton network


converttocpp.m export matlab trained net into cpp code
neurotrendbfg.cpp cpp exported code from matlab
weightinput.xlsx weight input layer data
weightinput2.xlsx weight input layer 2 data
biasinput.xlsx bias input layer data
biaslayer2.xlsx bias layer 2 data
Matlab vs NS2 training result.xlsx comparison Matlab vs NS2 result

You might also like