Build Neural Network Indicator in MT4 using Neuroshell

Dear Mrs. Arryex
I have read a PDF from you named "Create Neural Network in Excel" (@Arryex, 2012). Would you be able to send me that spreadsheet please? So I can start to understand how to work with NN.
michelcaspary at gmail dot com
best regards.
 
Create Neural Network in Excel

Dear Mrs. Arryex
I have read a PDF from you named "Create Neural Network in Excel" (@Arryex, 2012). Would you be able to send me that spreadsheet please? So I can start to understand how to work with NN.
michelcaspary at gmail dot com
best regards.


Hi Lukas,

Most of data pre-processing involves translating (convert symbol to number) and normalization. Example if you have two or more categories of your input such True or false, high or low, bullish or bearish, they will be converted into number example 0 and 1, or 0 for cold, 1 for warm and 2 for hot. Normalization is converting your data into a range, example 0 to 1 or -1 to 1, etc.

It will depend on the software that you use, some of them has automatic data pre-processing (such as neuroshell2, neuroshell trader, trading solution, etc), some of them has manual step to make data normalization (neurosolutions for excel).

On certain case, you can do it using excel, as long as you know what is the formula. See attached sample.

Selecting the best input will depend on the type of NN you have, is it prediction or classification? Kohonen SOM doesn't care about the input, but if you use back propagation to predict future values then the best inputs are input which can resulting a good prediction. R square criterion, MSE, correlation, % same sign are commonly used.

Salam buat orang Indonesia...(if you are currious please PM me:D)

Happy Trading
 
Hi Michel,

Sorry, due to my mistake, some time creating pdf file but not keeping the native in the same name and folder. Searching the old file with the file name or extension not giving me the expected correct file.

If I could not found it, I will make a simple excel one, please give me few days in order can prepare it.

Cheers,

Mr. Arryex
NB: I am a male
Dear Mrs. Arryex
I have read a PDF from you named "Create Neural Network in Excel" (@Arryex, 2012). Would you be able to send me that spreadsheet please? So I can start to understand how to work with NN.
michelcaspary at gmail dot com
best regards.
 
Thank you Arryex.
I will wait for your reply. I am sorry for my mistake.
regards

Michel Caspary
[email protected]

Hi Michel,

Sorry, due to my mistake, some time creating pdf file but not keeping the native in the same name and folder. Searching the old file with the file name or extension not giving me the expected correct file.

If I could not found it, I will make a simple excel one, please give me few days in order can prepare it.

Cheers,

Mr. Arryex
NB: I am a male
 
Hi Michel,

Are you a portfolio Manager da empresa Banco Santander? I have seen some one in linkedin has similar names as yours.

I did rewriting the excel in smaller size, the intention is only to show how NN formula implemented in excel.

All yellow shading cells are the area you can change, i.e. data and the NN (weight & bias in all neurons), all white cells (no color shading) is automatically calculated, and the blue shading cells are the optimization target we have such as minimum absolute error, coefficient correlation or the R-squared.

Here are the brief explanation about NN created:
1. I have 4 inputs X, X1, X2 and X3 and one output neuron X4, 3 slabs (1 input slab, 1 hidden slab and 1 output neuron).
3. I have 12 data rows.
4. I use normalization (scaling) all data into [0,1]
5. I have 3 neurons in slab 2, then there are 4x3 weight data for each neurons to connect with all 4 inputs. w(x,y) means weight that connect input x to hidden neuron y in slab2.
6. I have 3 bias for each neurons in slab 2, denoted as b(1,y).
7. I have logistic transfer function = 1/(1+EXP(-(sum of(w(x,y)*Ix+b)) to get output neurons values in slab 2, where Ix indicates each input value.
8. I have 3 weight to connect output neurons from slab 2, denoted as v1,v2 and v3.
9. In slab 3 I use logistic transfer function = 1/(1+EXP(-(sum of(v*Ix+b)) to get output neurons values in slab 2 and one bias. This output neurons are predicted values of X4.

The file is password protected, read only but all formulas are shown, I will send the PM to you to inform the password to open it.

You can expand the data cells as you wish, but you should add some columns if you have more hidden neurons/slabs and add some calculation in the similar principle.

You can optimize using some genetic algorithm add-in, I have checked that Excel solver can be used with GRG Non linear method but only for limited data (use solver in Data menu).

Arryex
 

Attachments

  • Excel Screenshot.png
    Excel Screenshot.png
    55.5 KB · Views: 1,612
  • NN in Excel -small protected.xlsx
    24 KB · Views: 481
Hello guys just a quick one does anyone work in a macro fx fund here based in London please pm me .

@Arry pls can you please suggest how can i use noxa in R programming language.Many thanks

lets keep this noxa discussion going
 
Last edited:
Hi Supremegizmo,

You can found the ssa implementation using R languange, such as landshape.org/enm/r-code-for-ssa-example/‎ or http://cran.r-project.org/web/packages/Rssa/

I am not familiar wit R programming, but probably you can create code in R to call dll file from noxa, using similar principle while NSDT calling a dll.


Hello guys just a quick one does anyone work in a macro fx fund here based in London please pm me .

@Arry pls can you please suggest how can i use noxa in R programming language.Many thanks

lets keep this noxa discussion going
 
Hi Supremegizmo,

You can found the ssa implementation using R languange, such as landshape.org/enm/r-code-for-ssa-example/‎ or http://cran.r-project.org/web/packages/Rssa/

I am not familiar wit R programming, but probably you can create code in R to call dll file from noxa, using similar principle while NSDT calling a dll.

arry thx very much for contribution. If u are here in London then drinks and dinner on me mate(y)
 
Last edited:
Hi Pat,

Logically using similar method as what we have in MT4 now (MT4-NSDT or MTFeed), you may have connection between MT5 and NSDT.

You should recode from MT4 code into MT5, in addition to change dll code that are located in NSDT. You may contact developer to recode them into MT5. I have seen several peoples trying to find freelance coder to do this.

If you thing MT4 is sufficient, probably using zagtrader will give you simpler way, checkout http://www.neuroshell.com/products.asp?task=broker.

Hi Arryex

Can neuroshell be connected to MT5 ? Do you know ?
 
Last edited:
Hi Pat,

Logically using similar method as what we have in MT4 now (MT4-NSDT or MTFeed), you may have connection between MT5 and NSDT.

You should recode from MT4 code into MT5, in addition to change dll code that are located in NSDT. You may contact developer to recode them into MT5. I have seen several peoples trying to find freelance coder to do this.

If you thing MT4 is sufficient, probably using zagtrader will give you simpler way, checkout http://www.neuroshell.com/products.asp?task=broker.

Thanks
 
guys a question regarding eigen vector.. say for example i find a lisajuous pattern when using data between 2000-2003 which has 1000 bars, Now I add another 1000 bars and found that the lissajous pattern does not exist or has distorted.

The first pattern has a group depth 10,2 whereas when i added the 1000 bars it was difficult to find circular patterns anywhere near 10,2.

Does this mean when i plotted eigen vector for first sample of 1000 bars the data was fitted to that 1000 bars which essentially means that in future the cycles cannot be reliable?? Am I getting this concept right?
 
Hi Supremegizmo,

This is theoretical concept of singular spectrum as what I understand (correct me if I am wrong):
- Any time series data (in wave form) could be decomposed into several components.
- One component represent a single characteristic of overall wave/cycle.
- The component of singular spectrum characteristic represent with its eigen value.
- If we combine all components it will become the original wave/cycle.
- We can use a component or group of component to identify wave, for example main trend (longer wave) usually at small eigen value or summation of small eigen values. Higher eigen value indicates shorter wave.

If you refer to Noxa SSA:
- groupstart indicates first component you intend to group (known as eigen value).
- groupdepth indicates, number components intend to group. if you set groupstart=5, groupdepth=3, means you group wave with eigen values=5, 6, 7, if you set groupstart=9, groupdepth=4, means you group wave with eigen values=9, 10, 11, 12.

You can see in NSDT chart:
- if you have one cycle component then Lissajous pattern will be linear.
- If you group two cycle components with different phase 90 deg each other. The corresponding Lissajous pattern is a circle.

Your problem:
- Why after adding 1000 bar data the Lissajous pattern is distorted? This indicates that your cycle/wave characteristic of you new data is different from previous first 1000 bars, means longer wave (trend) and shorter wave are changed.

On real life, there is no reason that the new data will always has similar cycle characteristic, means there will be no guarantee that your Lissajous pattern will be similar all the time.

Conclusion:
You will be successful using noxa cssa, only if, the new bar data still have similar wave/cycle characteristic as previous data. If the cycle characteristic is changed, you previous identified cycle will be useless.

Note: by having this cycle, you can pick peak and valley which you can place sell and buy respectively.
 

Attachments

  • Lissajous - single component.png
    Lissajous - single component.png
    40.2 KB · Views: 473
  • Noxa groupstart groupdepth and Lissajous - two components.png
    Noxa groupstart groupdepth and Lissajous - two components.png
    48.1 KB · Views: 507
Last edited:
I am not sure, if this one telling relation between trainbars parameter and the applicable trading bars we could apply.
When i set trainbars=300, the trade signal only valid about 137 bars which is <50% trainbars.
 

Attachments

  • trading strategy using cssa.png
    trading strategy using cssa.png
    52 KB · Views: 2,344
I am not sure, if this one telling relation between trainbars parameter and the applicable trading bars we could apply.
When i set trainbars=300, the trade signal only valid about 137 bars which is <50% trainbars.

Arry,

I also thought about the same on EV and pattern extraction. I think its better if for example one tries to find a circular lissajeous pattern on a larger set for example 10k bars. By doing so I think there is less chance that the pattern will immediately dissapear. in this context 10k bars for 1 hr chart is approx 400 days..so if u lucky to find a good pattern in 400 days days of data then it is highly likely that the cycle will last longer.. (y)
 
Supremegizmo,

I have better equity curve when the trainbars set in wider range and let NST to optimize it, I put range of trainbars within several blocks instead a fixed trainbars value.

What we should verify is:
- if we set trainstart=1 and trainbar=10000, means noxa will create ssa at bar 10001 until bar 20000
- it will recalculate a new ssa until next 10000 new bars created (at bar 20001)
- will you believe market price movement will follow noxa cssa? I doubt.
- ensure that all previous ssa (before bars 20000) are not changed .
Anyone would test it?
 

Attachments

  • trading strategy using cssa larger trainbars.png
    trading strategy using cssa larger trainbars.png
    72.4 KB · Views: 4,002
Supremegizmo,

I have better equity curve when the trainbars set in wider range and let NST to optimize it, I put range of trainbars within several blocks instead a fixed trainbars value.

What we should verify is:
- if we set trainstart=1 and trainbar=10000, means noxa will create ssa at bar 10001 until bar 20000
- it will recalculate a new ssa until next 10000 new bars created (at bar 20001)
- will you believe market price movement will follow noxa cssa? I doubt.
- ensure that all previous ssa (before bars 20000) are not changed .
Anyone would test it?


Arry Train start 1 and train bar 10,000 means it will train 10,000 bars from first bar..
I am still doing research so do not if markets follows cssa but the concept looks interesting and powerful:cheesy:
 
Hi Krzys,

Please find here attached Training and Test result for NS2, the detail is explained on the pdf file.

I made my own trick to combine your train and test data as a file and adjust the training and test range as per original configuration. Using 5 layers backpropagation network, the result: minimum average error: 0.0000302 (0.3 pip) on 19997 train pattern and 0.0000624 (0.6 pip) on 4998 test pattern resulted within 8 min 40 s.

The second file using NSpredictor only for Train pattern: NN method resulting MSE 0.000001 and R squared 0.999942, and using GA resulting MSE 0.000005 and R squared 0.999743. The training only within 16 second for NN and less than 3 minute for GA. The NN stop by itself and GA I stop manually (require more times). I need to find the way how to indicate the result with the test pattern.

Use the same password as the last file password, any other who requested please PM me.

Regards,
Arry

Arryex, could you please send to me the password of pdf files? Thanks
 
Hi Lukas,

Most of data pre-processing involves translating (convert symbol to number) and normalization. Example if you have two or more categories of your input such True or false, high or low, bullish or bearish, they will be converted into number example 0 and 1, or 0 for cold, 1 for warm and 2 for hot. Normalization is converting your data into a range, example 0 to 1 or -1 to 1, etc.

It will depend on the software that you use, some of them has automatic data pre-processing (such as neuroshell2, neuroshell trader, trading solution, etc), some of them has manual step to make data normalization (neurosolutions for excel).

On certain case, you can do it using excel, as long as you know what is the formula. See attached sample.

Selecting the best input will depend on the type of NN you have, is it prediction or classification? Kohonen SOM doesn't care about the input, but if you use back propagation to predict future values then the best inputs are input which can resulting a good prediction. R square criterion, MSE, correlation, % same sign are commonly used.

Salam buat orang Indonesia...(if you are currious please PM me:D)

Happy Trading

Arryex, your are the best !..now the normalization is clear form me !!!
Many thanks for your contribution into this thread, it's very interesting:clap:
 
Top