Build Neural Network Indicator in MT4 using Neuroshell

Hi All!

Just want to warn you that I'm not very good at English. I am from Russia.))

Arryex, could you show the results of tests that give you confidence that trading will continue to be successful.

For example, I test the strategy in the last 10 years of historical data to see how one or another strategy behaved in different market conditions.

Another such question, how often have you training these Neural Networks ?

-------------

Всем привет!

Сразу хочу предупредить, что я не очень хорошо владею английским. Я из России. ))

arryex, не могли бы Вы показать результаты тестов, которые дают Вам уверенность, что торговля и далее будет проходить успешно.

Например, я тестирую стратегии на последних 10 годах исторических данных, чтобы увидеть, как та или иная стратегия вела себя в разных состояниях рынка.

Ещё такой вопрос, как часто ты тренируешь нейронные сети?
 
Hi tol64,

The best method to test your trading strategy is what explained by Robert Pardo's Book: design, testing and optimization of trading systems.

His method actually we can test within Neuroshell Trader using Walk Forward Test, this link can show you how this program do the walk forward test/analysis:

home.comcast.net/~countertrender/AI_for_the_Individual_Trader.pdf

Using this shifted walkforward (training, validation, test and production), we expect the net should covers all market conditions.

How often training the net, it will depend on the input and output net you have, if the input is cyclic type and moving between a range (example RSI, stochastic) hence your net should be suitable all over the time. If you are using non cyclic type (such as MACD, price, etc) then your net should be retained whenever the range of inputs are changed. Consider also to utilize normalization.

Based on my experience, finding the input and output for the net is the most part of your time, the training for me take my small part. For your info, I never do retraining my net for my indicator aaNeuroMACD or aaNeuroTrend, amazingly sometime I use it in other pair even I trained the net only in EURUSD. This because I used cyclic indicator.

Cheers
 
Here I show you my indicators inserted into XAUUSD, even I trained the net using EURUSD.

cheers
 

Attachments

  • Picture 1.png
    Picture 1.png
    65.4 KB · Views: 933
Last edited:
A simple question. Does this neural system work or is it still in the workings? The way I see it, is that the best system is the one that requires some trader to make the final decision by hand before a trade is executed - otherwise you are bound to loose it all at one point (that point comes sooner rather than later). The idea of having a black box/system that will make money while you sleep or watch TV is as realistic as getting abdominal 6 pack by watching TV and having a belt vibrate on your stomach. No matter where technology goes and what happens, one thing will always remain a fact - you cant receive anything of value in this universe unless you pay some price - usually hard work.
 
Mine, it is working and continue to work on it for developing, testing and improving..still needs hard work.
What you mean about black box? for me using neuroshell you can verify what mathematical relation between input and output using weight, bias values and neural network configuration, nothing hide.
Someone who are using matlab may also verify the detail information about network being developed, I found some products deliver the solution without showing this information...
 
NS2 Optimization using Higher speed processor

Hi,

I just played using higher speed processor, found some tremendous improvement.
New PC spec: AMD 3.3 GHZ X6 1100T, Motherboard Asus Crosshair IV Formula, RAM 3x2GB Corsair Dominator-GT, Nvidia GeForce 8400G 512MB.
Old PC spec: AMD 2.4 GHZ X4, Motherboard Gigabyte GA-M51GM-S2G, RAM 2x2GB, Nvidia GeForce 8400GS 256MB.

Using same optimization problem
1. In old PC: time required to reach MAE testing range 0.0016539, about 27 minute 29 seconds, 5312 epoch
2. In new PC:time required to reach MAE testing range 0.0016539, about 49 seconds, 156 epoch(y) CPU has been autounlocked through BIOS become 3.8 GHz (16 up%)
3. In new PC:time required to reach MAE testing range 0.0016539, about 43 seconds, 143 epoch:D CPU has been software turbounlocker 16.5% up prior optimization started
4. Only 4 out of 6 cores has been loaded during optimization, less than 20% in average. This because NS2 is not optimized using multicores.

I wonder if someone has experience to use any software in order any other software can utilize all available cores. I plan to have ATI GPU and test if it can improve optimization.
 

Attachments

  • 2.2GHz optimization.png
    2.2GHz optimization.png
    50.8 KB · Views: 531
  • 3.8GHz optimization.png
    3.8GHz optimization.png
    78.1 KB · Views: 409
  • 3.8GHz optimization plus turbo unlocker.png
    3.8GHz optimization plus turbo unlocker.png
    79.8 KB · Views: 410
  • CPU core utilization.png
    CPU core utilization.png
    75 KB · Views: 401
Hi Arry,
I read thr this post and suprised what all you done so far! I am programmer and start working on AI.
May I ask that what softwares I need to buy to try out this idea? At I understand that i need:
- NeuroShell DayTrader
- NeuroShell 2
- Some NeuroShell Predictor
Those cost a fortune to me!!!

Thank you so much!
P/S sorry my English.
 
Hi Akuma,

For starting you do not need them all, I believe you know already about AI(NN, GA, Fuzzy), I advice you to start familiarize with Neuroshell 2 otherwise you can start with free product such as JNNS or others. With NS2 you can verify in detail about neural network (input, output, nn architecture, optimization, etc). you can export trained net to be used for other software or event MS excel (old version).

You can combine your programming capability to produce indicator/EA in MT4 (if your trading platform is MT4), otherwise you can use API facilities on other platform, sorry out of my knowledge.

If you want to dig more with genetic algorithm you can try AI trilogy, neural networks on this software not clear as NS2 (more black box), but you can utilize runtime facility to export your trained net (predictor and classifier).

Some people jump directly to NeuroshellTrader may get confuse, although is ready to use but most of people get difficulties to start with and WANT TO GET PROFIT immediately. Do not expect that event you have all software, they may not useful without learning them first.

Good luck to start
 
Hi Arry,
Thank you so much on your advices. I'm going to buy NS2 and study.
So, like on some of your posts, I need to collect data, put it in NS2 to train the net, then export that net to make MT4 indicator, make EA base on that indicator and test a outcome. Any other advices?

Best Regards
 
Hi Akuma,

If you can maximize the benefit of using NS2 and MT4 you should get success with them. You should believe some success story of some people (scientist, banker, etc) using Neuroshell2, the problem is always remain the same need high effort to come there. I am happy to discuss your development..I should learn a lot of things from other person like you, the idea and process behind any development.

But I may reject the person who request only the final result and want to jump to an immediate profitable trade ...sorry

Another tools, you may already know and the most important thing is YOUR SELF, I think you should open your mind..not limiting your self, more knowledge more better. You can learn also other technical analysis, candlestick, Fibonacci, fundamental analysis, money management and psychological analysis. All aspects should help you better... and from there you can start work with neural network.

My own development always based technical indicator prediction which may give earlier trading signals, use neural network to get it..money management always help you to develop trading any strategy/EA.

Currently I am not a successful trader, but using these tools, I always develop and never stop..and will be...insya Allah...

Best regards
 
Nice trade result today...
 

Attachments

  • nice trade 21-Mar-11.png
    nice trade 21-Mar-11.png
    228.7 KB · Views: 869
Thanks Arry.

I'm programmer, not trader. So, many thing need to be learned before I make myself become a trader :)
But I'm studying here that is it some way to predict something in near future base on its behaviors in the past, in this case are price or MACD(need to google this :))

Anyway, do "Build Neural Network Indicator in MT4 using Neuroshell" solve for u?
 
You are well come Akuma,

You can try to predict price or MACD, you need to learn more which input, output,or methods to get them.

So far I solve my prediction using NN, even not perfect but still within improvement..It solve few of my objectives i.e. to define when entry, exit, not to trade, safe lot size to trade, risk management..
 
Hi Arry,
I did fulltime research lastweekend, and gratz that I was read this thread :smart:
I don't buy NS2 yet because that what I learn so far is NS2 just NN engine and that I can write myself for cheapest solution. Result not so good that my program run slow but I have spare PC for it to run over night :cheesy:.
But while my program running, I read your posts again and wondering a few things:
- Why training your MACD, u use NS2 train a net and then use NSDT retrain it? Why retrain?
- i write myself some EA base on some normal indicators, none of it have good result, how could u have good result with your normal MACD?
- I will soon use NEAT. Did anyone give it a try?

Best Regards
 
Hi Akuma,
- You can use NN to predict anything, MACD is of of them. Actually if I use NSDT to retrain means he will reoptimize indicator parameters that are used as input.
Example, with your NS2, you can make a net with few indicators for example RSI(Close, 14), Stochastic(High,Low,Close, 8) then I get one trained net. If all your data coming from NSDT then more easier to export them to train in NS2 and display it back as indicator in NSDT.
When I create indicator to show trained net from NS2 in NSDT, then in NSDT I build a prediction or trading strategy. During optimization in NSDT, using genetic optimizer, NSDT will find the optimal values of indicators input for your trained net. NSDT may come out with new optimum indicator parameters such as RSI(Close, 18), Stochastic(High,Low,Close, 5) but still using network configuration made in NS2.
With NSDT you can use any output from other net as input for others (not only optimize normal indicators)..you can try this method freely. I did the same thing on AI Trilogy, after getting a net from NSPredictor or NS2, I can use Genehunter to optimize parameter in Excel. Surprise huh...?
- To have a clue whether an indicator giving a god result or not, you need to have a deep investigation otherwise you will move from one to other indicators in order match with your needs. I use MACD to identify the trend, combine with other tools to make an entry. Even not sophisticated one but giving a clue. Another different thing is I use predicted MACD instead of normal MACD.

Hope not confusing you...
 
Hi,

After someone posting previously his idea on RSI prediction, I just completed my own small research continuing RSI prediction. Here are the description in brief:

Input: 15 inputs (delta of EMA1, EMA2, EMA3, RSI1, RSI2, WPR1, WPR2, MACD1, MACD2, MACD3, MACD4, Stoch1, Stoch2, Stoch3, Stoch4)
Output: 5 bar future RSI
Training Data: 3994 bars, 15m time frame
Net configuration: net1 (Back Prop 1 hidden slab), 3(Back Prop 2 hidden slab), 4(Jump 1 hidden slab), 6 (jump 3 hidden slab), 14 (ward 3 hidden slab)

After Training, trained net calculated within Excel, based on manual calculation for all data (58034 bars data)

Based on the R-squared calculation found that net 14 giving smallest R-squared
Indicator implementation:
1. create original RSI with its MA (aaRSI)
2. Create Predicted RSI (aaNeuroRSIc-xx) for all trained nets with its MA

Result:
1. Compare to original RSI, the predicted more smooth, some spikes are dampened, see how original RSI cross over MA
2. Combine with its MA, can give earlier trade signal but more lag compare to original RSI
3. All indicators event using different net, giving same indicator values on MT4

Is this indicator will be useful...may be..
 

Attachments

  • Training data.png
    Training data.png
    67.1 KB · Views: 998
  • R-square calculation.png
    R-square calculation.png
    143.5 KB · Views: 823
  • indicator result.png
    indicator result.png
    74.2 KB · Views: 754
Hi Akuma,
- You can use NN to predict anything, MACD is of of them. Actually if I use NSDT to retrain means he will reoptimize indicator parameters that are used as input.
Example, with your NS2, you can make a net with few indicators for example RSI(Close, 14), Stochastic(High,Low,Close, 8) then I get one trained net. If all your data coming from NSDT then more easier to export them to train in NS2 and display it back as indicator in NSDT.
When I create indicator to show trained net from NS2 in NSDT, then in NSDT I build a prediction or trading strategy. During optimization in NSDT, using genetic optimizer, NSDT will find the optimal values of indicators input for your trained net. NSDT may come out with new optimum indicator parameters such as RSI(Close, 18), Stochastic(High,Low,Close, 5) but still using network configuration made in NS2.
With NSDT you can use any output from other net as input for others (not only optimize normal indicators)..you can try this method freely. I did the same thing on AI Trilogy, after getting a net from NSPredictor or NS2, I can use Genehunter to optimize parameter in Excel. Surprise huh...?
- To have a clue whether an indicator giving a god result or not, you need to have a deep investigation otherwise you will move from one to other indicators in order match with your needs. I use MACD to identify the trend, combine with other tools to make an entry. Even not sophisticated one but giving a clue. Another different thing is I use predicted MACD instead of normal MACD.

Hope not confusing you...

I'm truely surprise Arry, and still confuse!!! :confused:
Anyway, thanks for fast response!!
 
Hi Akuma,

You are confuse if you do not have them. Here I explain step by step, I assume you already export the data into NSDT.
In NSDT:
1. Create all indicator inputs and output for your prediction, let say
inputs: RSI(Close,14), MACD(Close, 12,26,9), Stoch%D( high. Low. Close, 5,5)
Output: Future 5 bar of MACD(Close, 12, 26, 9)
2. Now export all inputs and output into csv format (save as comma delimited format) which can be read in NS2, Save the file in NS2 folder for training works.

In NS2:
1. Import the csv format, identify input and output variables
2. Select neural network configuration, data range for training and testing, training method, stop criteria, etc.
3. Safe the result in dll format (def file).
4. copy def file into NSDT\template folder
Assume that you already have a good trained net, now job in NS2 is completed.
Showing trained net as indicator in NSDT:
1. Call indicator external program and library call, select NS2 (you can also have option for chaoshunter, NSpredictor, NSClassifier or your own dll file)
2. Select the def file from trained net, insert all original input indicator & parameter, i.e. RSI(Close,14), MACD(Close, 12,26,9), Stoch%D( high. Low. Close, 5,5)
3. Now the predicted output Future 5 bar of MACD(Close, 12, 26, 9) will be displayed.
4. Create Trading strategy based on predicted indicators (let call as predMACD), example crossover between predicted MACD and original MACD (cross up for buy and cross down for Sell), these are available in NSDT.
After run the optimization in NSDT you may have Buy and Sell entry which may having different parameters.
Originally for buy signal you may have cross above(predMACD(Close,12,26,9), MACD(Close, 12,26,9)), after optimization to get maximum profit it may be changed, example to become cross above(predMACD(Close,6,18,5), MACD(Close, 12,26,9)).
This means, the trained net made in NS2 will be reoptimized in NSDT to achieve optimum profitable trade.
This is only an example that any output from a net can become input for other net. You can implement the same way into your own program.

Here I show you the dll importing capability on indicator wizard available in NSDT. The chart data is coming from MT4, and you can send the trading signal from NSDT to MT4.

Hope more clear for you..
 

Attachments

  • indicator wizard in NSDT.png
    indicator wizard in NSDT.png
    179 KB · Views: 684
Last edited:
Top