@aroonraj (aroonraj) posted a new topic, subject "Neural Network EMA system (NeuroTrend)". It read: Hi Everyone, After a lot of research, reading excellent basics at babypips and experimenting with various systems, I have finally implemented a forecasting system based on Neural Networks. Neural networks based systems are proven in financial forecasting and in general in learning patterns of a non-linear systems. I believe strongly that forex market is a non-linear system which is difficult to model. But one good thing of forex market is that it represents some patterns which when known can be applied in making trading decisions. Proof of this concept is technical analysis and theories that are widely used by traders in identifying these patterns. This makes neural networks a better tool for forex market as neural networks are know their ability of learning unknown processes and forecast the patterns of the process ahead. Lets get to the main point. In this thread I would describe the working of the system I have developed rather than the system itself as it is a long way to explain. The system is basically a time-series-forecasting system, which means we give as input information about current Bar and the system would give out information about Bars in future. I am sure now you are thinking if its really possible and if so what are the actual inputs and what are the actual outputs. I would strongly suggest the reader to go through the basics of neural networks before reading further. [B]An Introduction to Neural Networks forecasting[/B] Note: The system is optimized and targeted to trade on EURUSD 15min chart INPUTS EMA(t) - EMA (t-1) EMA(t-1) - EMA (t-2) EMA(t-2) - EMA (t-3) RSI(t) RSI(t-1) %R(t) %R(t-1) MACD(t) MACD(t-1) Stoch(t) Stoch(t-1) 1H EMA(t) 1H EMA(t-1) OUTPUTS EMA(t) - EMA(t+1) EMA(t+1) - EMA(t+2) EMA(t+2) - EMA(t+3) where t means current time or Bar. As you see, we give the difference of the past three EMA of the 15min chart Bars, past two indicator values of RSI, %R, MACD, Stochastic and past two EMA difference of 1H chart Bars. The system will be able to forecast and output the future 3 EMA difference of 15min chart Bars. How is this able to forecast is hard to explain (may be I will start a second thread), but for now you should consider the system is able to do so as it has been trained on several past data (3-6 months). The system for now consists of an indicator and an include file (both attached at the end). I would be showing some examples how it can be used to detect the patterns of forex market and make trading decisions. Dashed Aqua blue line (bottom most): EMA 5 bar Yellow line: Forecasted EMA(t+1) / output 1 of neural network Green Yellow line: Forecasted EMA(t+2) / output 2 of neural network Gold line (top most): Forecasted EMA(t+3) / output 3 of neural network In the figure above it is clear from the forecast lines that the trend is going to be Bullish eventhough the current EMA shows Bearish trend. This is a kind of lead indicator. BUY SIGNAL 1. All three forecasts significantly above current EMA 2. RSI trending up from below 50 level and about or crossed 50 upwards 3. Stochastic Main > Signal and trending up from over sold region 4. Optional: MACD going negative to positive Example SELL SIGNAL 1. All three forecasts significantly below current EMA 2. RSI trending down from above50 level and about or crossed 50 downwards 3. Stochastic Main < Signal and trending down from overbought region 4. Optional: MACD going positive to negative Example Installation: Please read the Instructions.txt file in the zip file attached below. A step by step procedure to install the NeuroTrend is documented in the file. If you find difficulty in installation do not hesitate to ask me… Finally I would like to say that have fun with the system and if you like it do comment. If you have ideas or suggestions to apply it or adapt it, share it in this thread. My main aim in making it open to this forum is to get experts suggestions and improve it and learn from the experience of its applications…of course also earn a couple of bucks hehehehe Note: Due to file attachment limitation, the actual files are zipped to NeuroTrendv1.0 Cheers! Aroon image011.jpg700×386 41 KB NeuroTrendv2.0.zip (21.4 KB) So @bnbb2004 (bnbb2004) replied Pretty cool system…What is your exit strategy? To which @aroonraj (aroonraj) replied bnbb2004: > Pretty cool system…What is your exit strategy? Hi, Exit strategy for long is when the dashed EMA5 line moving up and crossing the forecast signals or all the signals come together with no significant difference. For short its the opposite ie… the dashed EMA5 line moving down and crossing the forecast signals or all the signals come together with no significant difference. Stop loss: For long, recent swing low or 20pips below. For short, recent swing high or 20pips above. Best Wishes, Arun Then @nabil114 (nabil114) said how well does your system work? @aroonraj (aroonraj) replied nabil114: > how well does your system work? I cannot give quantitative results as I did not trade live with the system. I am currently testing it with a demo and live account. I would publish as soon as I have significant results. I am seeking also interested people to join me and give valuable feedback to optimize the system. I would suggest interested people to load the forecasting system and see how it is able to forecast the future signals. In my opinion this is a kind of [B]lead[/B] indicator every trader is looking for. I have been doing a lot research to program a forecasting system based on neural networks and tried various methods. The final best output of my effort is NeuroTrend. I am open to explain in detail how neural networks work, architecture of the system, and how to train such systems in return to suggestions, testing results and valuable feedback. Thanks, Aroon After which, @nabil114 (nabil114) added i think demarker indicator is better version of the rsi. maybe you can also need think about sideways market and how your system would predict that!!! if small sideways movement. Then @4xStar (4xStar) said Hi … I saved the template and indicators to the correct folders (I've had a lot of experience installing indicators and templates) but when I load the template, the indicators are not listed on it and also the Neuro Trend Indicator is not in the indicators list even though it is in the indicators folder. Any suggestions? To which @aroonraj (aroonraj) replied 4xStar: > Hi … I saved the template and indicators to the correct folders (I've had a lot of experience installing indicators and templates) but when I load the template, the indicators are not listed on it and also the Neuro Trend Indicator is not in the indicators list even though it is in the indicators folder. > > Any suggestions? The reason for not loading properly would be not able to find the ex4 file in the folder. You need to open the NeuroTrend_indicator.mq4 in editor and compile once so that the ex4 (executable) is created and then load the template. I think restarting the terminal should do this automatically. If it does'nt help tell me I would recheck it on my system and send the ex4 files if needed. Best Wishes, Aroon So @aroonraj (aroonraj) replied nabil114: > i think demarker indicator is better version of the rsi. maybe you can also need think about sideways market and how your system would predict that!!! if small sideways movement. Thanks for the suggestion, I can test it by adding also Demarker indicator as one of the inputs. My intention to use RSI was only as a trend confirmation tool. I should also read about Demarker. I have never used it. Concerning sideways, the indicator is right now able to be quite when the market is moving side ways (absolute). Any better suggestions (indicators) to improve the side way pattern detection? Also neural networks are capable of learning any pattern that has to be detected unless and until the model is define well and the inputs given have this information. In my experience with various indicator inputs, I found the currently included indicator inputs work better. In future I plan to make a table of indicator inputs and their combinations and a comparison of the outputs according to the inputs. Best Wishes, Arun Then @aroonraj (aroonraj) said I have updated the indicator and template. Following are the new changes. 1. Email and Alert notification on setup 2. Small chages to the colors of the levels Download the new version from the attachments To which @nabil114 (nabil114) replied are you trying make ea based on it. i think it is important to understand relationship of time because thats when markets are you usually quiet. @aroonraj (aroonraj) replied Yes I plan to program an EA based on NeuroTrend indicator, but I would do that only after I have a well optimized neural network forecaster. If I start to program an EA right in the initial phase I would loose my concentration on the model and the parameters for the network to better forecast. To which @johnnykanoo (johnnykanoo) replied to be honest with you i am interested in neural networks but to be frank I dnt know anything about them. This thread is so confusing to me is there anyway that you can give me a basic breakdown of what neural networks are and how it relates to your system. I hope you don't misunderstand me i never mean to insult you I just feel lost in your beginning posts and if you could put it in “laymens terms” I might have half of a chance at understanding it. Thanks, John So @aroonraj (aroonraj) replied johnnykanoo: > to be honest with you i am interested in neural networks but to be frank I dnt know anything about them. This thread is so confusing to me is there anyway that you can give me a basic breakdown of what neural networks are and how it relates to your system. > > I hope you don't misunderstand me i never mean to insult you I just feel lost in your beginning posts and if you could put it in “laymens terms” I might have half of a chance at understanding it. > Thanks, John Hi John, In this reply I would, in short, try to explain what a neural network is and how it is applied for financial and business forecasting. By definition, neural networks simulate biological network of human brain. Means they act and try to learn and perceive things as done by the neurons in the human brain. In simple words for me a neural network is a [B]black box[/B] which has some [B]inputs[/B] and some [B]outputs[/B]. Now let us assume that this black box has a [B]memory power[/B] inside it. And also assume that if we feed this black box with prior known inputs and prior known outputs, the memory power of the black box is capable of learning both the inputs and outputs. By inputs and outputs here I mean numbers. Now let us say we have a system which we want to learn. In our case we want the black box to learn the price changes of forex market. So forex is for us a non-linear market which cannot be modeled. By modeling I mean one cannot say how the prices change and what influences the prices. But we assume that it has some [B]patterns[/B] that repeat or can be identified like bullish trend, bearish trend, Elliot wave pattern, flag, triangle, etc… How the memory power works is strongly dependent on the design of the neural network, what (patterns) are aimed to learn and how well the inputs are selected for the outputs that the blackbox has to produce. Now I will explain how neural networks relate to the system (NeuroTrend) I have designed. Note the following notation. It is opposite to the mql notation, but this will make us understand things easier. t: time of the current candle / Bar t+1: time of the next candle / Bar t-1: time of the previous candle / Bar t+n: time of the future nth candle / Bar t-n: time of the past nth candle / Bar Now with this notation lets see some examples EMA(t) = current EMA = EMA with shift 0 = iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,0); EMA(t-1) = iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,1); NeuralTrend is a neural network system which is designed to learn the forex market movements and forecast it. Lets see the design of this neural network. Once we have designed our network, ie. what are our outputs, inputs and how many elements is the network composed of, we are ready to train it. What I did is collected data of previous [B]2-6 months[/B] and trained the network. During training the outputs are also history data and inputs are also history data but not the same. Ex: if my outputs are [B]EMA(t-1), EMA(t-2) and EMA(t-3) inputs must be values of indicators of (t-4) or before[/B]. The main usage of the neural networks is only after training. [B]Usage:[/B] Since we trained our network with history data, it has learnt the patterns that are represented in the training data. Now, if we give some inputs to the network, it should be able to give outputs according to the given inputs and based on how well it has learnt patterns in training phase. In NeuroTrend if we give[B] current candle/Bar EMA[/B] and [B]other few commonly used indicators as inputs[/B], [B]NeuroTrend forecasts the EMA for the next 3 periods ie the future Bars[/B]. It is able to do so as it has learnt the patterns of the forex market. Knowing the future EMA we can estimate the what the price would be and can make decisions to buy or sell. Example: In robotics, a robot neural network gets inputs from various sensors (temperature, pressure, position, objects in view). The neural network provides according outputs for the robot to act. In reality, a neural network is more than just a black box and I have to dive into programming in order to explain logic behind it which would be a long topic for this reply. In coming weeks, I would introduce day by day to the actual neural network logic and examples by mql code. The code for creation of a neural network and usage is in the include file(NeuroTrend_Include.mqh) which is also used by the NeuroTrend_Indicator. I hope I have explained in short what a neural network is, how it is trained, and how it is applied in forecasting. Neural networks are widely used in Buisiness, financial, weather, non-linear processes forecasting due to their ability to learn unknown processes. Once taught with history data neural networks are used to know the future values and act accordingly. For a detailed explanation I would suggest to go through (only introduction) the following online tutorials. Neural Network Tutorial Neural Networks Introduction to Neural Networks Widely used application: Neural networks is also used to detect hand written characters on touchpads, PDA, etc… In the following link one can write characters and test how the network is able to detect. OCHRE- Optical Character Recognition Finally I would say that it is not hard to learn Neural Networks and apply, only it is a bit dry topic and needs attention. I learnt it myself and am confident of its ability in forecasting. [B]To the main thread about NeuroTrend and downloads[/B] Best Wishes, Arun After which, @johnnykanoo (johnnykanoo) added Wow!!! fantastic post. I get it now. So you are saying that based on price movements of the past the nn (neural network) will be able to churn out a future price. So in a way it is a program that seeks to trade like many people do in that we look at indicators which show past price movement and we try to (ugly word) predict future movements. The reason I like the nn as it is applied here is it is mathamaticaly correct and that can be good. (no trading on a whim) If an nn was able to give us a “realtime” indicator wow that could be pretty powerful stuff. Excellent work so far. Im definatly interested and when I have some time i will read your links on nn basics. thanks, john To which @AndreasF (AndreasF) replied I just downloaded and installed the files. In the demo-version it looks very promising. Will test it live on Monday for sure. Thanks, Aroonray for all your efforts and for sharing your ideas! Best regards Andreas Then @ewokuk (ewokuk) said I think you should add an indicator like an arrow for up/down so you can see where it has been triggered, otherwise you cant tell without examining it all very closely. After which, @aroonraj (aroonraj) added johnnykanoo: > Wow!!! fantastic post. I get it now. So you are saying that based on price movements of the past the nn (neural network) will be able to churn out a future price. So in a way it is a program that seeks to trade like many people do in that we look at indicators which show past price movement and we try to (ugly word) predict future movements. The reason I like the nn as it is applied here is it is mathamaticaly correct and that can be good. (no trading on a whim) If an nn was able to give us a “realtime” indicator wow that could be pretty powerful stuff. > Excellent work so far. Im definatly interested and when I have some time i will read your links on nn basics. > thanks, john Hi John, You got it right. Exactly as you said [B]a well trained neural network is like a highly experienced trader who can easily catch the market movements. He does it as he has been trading for a while and learning these patterns of the forex market.[/B] But to be frank it is also not so easy to design a neural network. It all depends on what parameters (inputs and outputs) are chosen for forecasting a specific pattern. This is why I want to discuss this topic so that I get valuable feedback from the experienced traders. If we ask about RSI or MACD or Stoch to different traders, we get also different answers how they use them and for what purpose they use them. Example some use RSI for trend confirmation and others for support and resistance. After a lot of trial and error attempts the current Neural Network indicator (NeuroTrend) is able to forecast trend changes. But I don't say it is highly accurate and it can forecast all the time 100% correct. This will strongly depend on the training. Best Wishes, Arun After which, @aroonraj (aroonraj) added AndreasF: > I just downloaded and installed the files. In the demo-version it looks very promising. Will test it live on Monday for sure. > > Thanks, Aroonray for all your efforts and for sharing your ideas! > > Best regards > > Andreas Hi Andreas, Nice to know that you see it promising. Do post your experience and suggestions for further development. Do let me know how you use it in your trade. Best Wishes, Arun After which, @aroonraj (aroonraj) added ewokuk: > I think you should add an indicator like an arrow for up/down so you can see where it has been triggered, otherwise you cant tell without examining it all very closely. In the latest version you get an alert and also email if a signal is triggered. Nevertheless the idea of showing an arrow would be helpful. Thanks for the suggestion, Arun After which, @mrpro (mrpro) added Nicely done with the informative post Anyways, you said you used 2-3 months of data… Have you tried training it with shorter periods of data? say weekly and what were the results? What about other timeframes? Hope to see more quality posts from you. To which @aroonraj (aroonraj) replied mrpro: > Nicely done with the informative post > > Anyways, you said you used 2-3 months of data… Have you tried training it with shorter periods of data? say weekly and what were the results? What about other timeframes? > > Hope to see more quality posts from you. Yes, initially I tried to train the network with weekly data. In my opinion, weekly data do not contain enough information for training. It also takes less time to train with small data. One major problem with small data would be that instead of learning the patterns, the network tries to memorize the given data. Right now I am concentrating on certain time period and chart as I have been looking at them for a long time and I am comfortable with them. If you trade with other time frame and are confident of some patterns that can be identified and indicators it can be trained. Cheers! Arun To which @4xStar (4xStar) replied aroonraj: > The reason for not loading properly would be not able to find the ex4 file in the folder. You need to open the NeuroTrend_indicator.mq4 in editor and compile once so that the ex4 (executable) is created and then load the template. I think restarting the terminal should do this automatically. OK, working now … I didn't realize I needed that ex4 file. I second the suggestion to add arrows or dots above or below the signal points Great work so far … I will be eager to see how this works out this upcoming week with EUR-$ in my demo account. From what I have seen of back signals, they are uncannily accurate. To which @johnnykanoo (johnnykanoo) replied well I got my chart set up and with a few color tweeks im ready to go. the template was very helpful. I reread through your thread so i feel warmed up to demo this. good luck to all this week. truthfully im very excited to try this and see how we can fine tune it and rule the world hoooooaaaaaahhhhhh!!! (insert evil laugh here) got carried away there:) thanks, john @aroonraj (aroonraj) replied 4xStar: > OK, working now … I didn't realize I needed that ex4 file. > I second the suggestion to add arrows or dots above or below the signal points Great work so far … I will be eager to see how this works out this upcoming week with EUR-$ in my demo account. From what I have seen of back signals, they are uncannily accurate. Happy to hear it works now. I would probably implement to show dots or arrows in this week. All the best for this week. Cheers! Arun @aroonraj (aroonraj) replied johnnykanoo: > well I got my chart set up and with a few color tweeks im ready to go. the template was very helpful. I reread through your thread so i feel warmed up to demo this. good luck to all this week. truthfully im very excited to try this and see how we can fine tune it and rule the world hoooooaaaaaahhhhhh!!! (insert evil laugh here) > got carried away there:) thanks, john Hi John, All the best for this week. I will be trading only after 5PM (Germany, GMT+1) as I have a regular job. Anyways looking forward eagerly for your experiences with the system and results. [B]Note also that the current chart update is tickbased, so becareful and do not trade between open and close if you get a valid signal.[/B] Cheers! Arun @aroonraj (aroonraj) replied Did someone caught this outstanding signal??? or this misty signal Arun After which, @nabil114 (nabil114) added hey… i am making a 5 min trending system with 4 indicator am running it for a while. i need to know how neural network if you put them as output would make it work better. let me run for a week and i will tell you the results. until now it made 17 pip for 20 july. @unFinisHeD (unFinisHeD) replied aroonraj: > Did someone caught this outstanding signal??? > > or this misty signal > > Arun Hi Arun, I'm interested in Neural Network system. Seems your system work well. Btw, may I know which broker do you use? Because I can't find that pattern on 28 July . Thx for the NN information and sharing this system To which @aroonraj (aroonraj) replied nabil114: > hey… i am making a 5 min trending system with 4 indicator am running it for a while. i need to know how neural network if you put them as output would make it work better. let me run for a week and i will tell you the results. until now it made 17 pip for 20 july. I am not clear of what you meant. Did you mean to know how to create a neural network forecast system based on the indicators your are using or do you mean to know how my system would work better with your indicators??? If you wish to know how to create a neural network out of the indicators you are using currently then you need to share your indicator setup and the patterns you usually detect. We will know if neural network performs better in detecting the patterns far ahead in time only by a good design and training. This will have its own learning curve. Cheers! Arun So @aroonraj (aroonraj) replied unFinisHeD: > Hi Arun, > I'm interested in Neural Network system. > Seems your system work well. > Btw, may I know which broker do you use? Because I can't find that pattern on 28 July . > Thx for the NN information and sharing this system Welcome onboard;) I use migfx (MIG Investments SA), a swiss based broker. Nice to know that the paterns have a distinguishable difference from broker to broker. Cheers! Arun After which, @unFinisHeD (unFinisHeD) added I've tried your system, I think it's better to give the signal after the bar is closed. Just giving my opinion… @aroonraj (aroonraj) replied unFinisHeD: > I've tried your system, I think it's better to give the signal after the bar is closed. Just giving my opinion… Yeah you are right its a bit confusing to watch tick based update. Thats why I mentioned in one of my post that trade entry or exit should not be done between open and close. I have already changed this in the [B]version 2.0[/B] along with many other changes. I would upload it by end of this week. After which, @unFinisHeD (unFinisHeD) added aroonraj: > Yeah you are right its a bit confusing to watch tick based update. Thats why I mentioned in one of my post that [B]trade entry or exit should not be done between open and close. [/B] > > I have already changed this in the [B]version 2.0[/B] along with many other changes. I would upload it by end of this week. Ah I see, I didn't realize what you mean by that back then. Hehehe… @aroonraj (aroonraj) replied I have changed the tick based update of signal to only Bar based update so that there is no more confusion. Please download the updated version from the attachment in the first thread or use the link below I will upload version 2.0 with other latest updates by end of the week. I am planning to create a document of instructions and latest updates which will be added to the zip file for the ease of newbies. Best Wishes, Arun @mrpro (mrpro) replied How long would a trained net with 2 months data “last” until it needs retraining? Or does it retrain itself? I'm kinda curious to as what programs you were using… saw there was some buzz about this on forex-tsd but theres hardly any straight to the point info on how one would go about applying this to forex… @4xStar (4xStar) replied I stand in awe of your generosity in sharing all this good stuff with us Just curious … since the $-swissy moves pretty much as a mirror to the euro-$, could this script work with that one as well … I have a chart up for observation. I didn't see anything in the code that resticts it to the euro so though I would give it a try. aroonraj: > I have changed the tick based update of signal to only Bar based update so that there is no more confusion. Please download the updated version from the attachment in the first thread or use the link below > > I will upload version 2.0 with other latest updates by end of the week. I am planning to create a document of instructions and latest updates which will be added to the zip file for the ease of newbies. > > Best Wishes, > Arun To which @aroonraj (aroonraj) replied mrpro: > How long would a trained net with 2 months data “last” until it needs retraining? Or does it retrain itself? I'm kinda curious to as what programs you were using… > > saw there was some buzz about this on forex-tsd but theres hardly any straight to the point info on how one would go about applying this to forex… This is a very good question. In my opinion it is better to train the network for every month which would make the network more robust to the latest patterns. If we train the network with data of 2-6 months I believe the network generalizes the model it has to learn. I intend to train the network for every month or two months over the generalized learnt parameters. As soon as I train, I would keep updating the latest versions. There are many free and opensource tools that one can use to train and test networks like Joone, SNNS, FANN, Simbrain. I am playing with these right now to find the best out of them. Could you refer me to the link of forex-tsd. I would like to know how others are applying neural networks for forex trading. Best Wishes, Arun Then @aroonraj (aroonraj) said 4xStar: > I stand in awe of your generosity in sharing all this good stuff with us > > Just curious … since the $-swissy moves pretty much as a mirror to the euro-$, could this script work with that one as well … I have a chart up for observation. I didn't see anything in the code that resticts it to the euro so though I would give it a try. I am not sure . I am not familiar with the patterns of $-swiss. If you believe they are similar, then it might work. As far as the code is concern it doesn't restrict to a specific chart or period, but since I have trained the network with data collected from EURUSD 15min chart, I suggested to use it on this setup. If you wish to apply it for $-swiss, I can train the network for $-swiss history data, but I can do it only for 15min chart as currently I can only output data for 15min charts with my data creator code. In return I wish you to share your experience of neural network on $-swiss. To say frankly, I am repaying for the knowledge I acquired from this website by sharing what I know. This is [B]the[/B] best site I have ever seen for learning forex trading. Best Wishes, Arun Then @nabil114 (nabil114) said i would suggest to add adx which is different in metatrader so this link will show you Average Directional Movement (ADX) - CMS Forex please look at the link help identify strength in the trades and help fight sideways market. To which @mrpro (mrpro) replied aroonraj: > This is a very good question. In my opinion it is better to train the network for every month which would make the network more robust to the latest patterns. If we train the network with data of 2-6 months I believe the network generalizes the model it has to learn. I intend to train the network for every month or two months over the generalized learnt parameters. As soon as I train, I would keep updating the latest versions. There are many free and opensource tools that one can use to train and test networks like Joone, SNNS, FANN, Simbrain. I am playing with these right now to find the best out of them. > > Could you refer me to the link of forex-tsd. I would like to know how others are applying neural networks for forex trading. > > Best Wishes, > Arun Dont wanna get in trouble with the admins here… just do a hurstrachel@example.com for neural network To which @4xStar (4xStar) replied I've been testing this the past week and it is amazing how predictive it can be. I suppose the trick is to keep the neural network ‘trained' as you call it … can anyone learn to do this or does it require some advanced programming knowledge. (I have some basic programming skills … not advanced!) Then @longboy (longboy) said 4xStar: > I've been testing this the past week and it is amazing how predictive it can be. I suppose the trick is to keep the neural network ‘trained' as you call it … can anyone learn to do this or does it require some advanced programming knowledge. (I have some basic programming skills … not advanced!) The lines redraw the past. So not too fancy like you said. Just play with it for couple of hours. To which @sumwatt (sumwatt) replied I only had time to run a single signal but it was a money maker. There was a nice short that came up between 3pm-4pm Central Time (-6 UTC i think or -7 with DST) that I didn't ride out but it was a money maker. It was funny because I had just installed the signals and chart template when it went off and I just did what it said. I had to actually go back and look to actually understand what it was doing. I was in demo so it wasn't any big deal. Then @aroonraj (aroonraj) said Hello Everyone, I was away from my computer for a couple of days and was not able to do the updates as planned previously but finally I made it to program the modifications I wanted to do. [B]Important update is that the network is trained with June and July history data.[/B] Best Wishes, Arun Then @aroonraj (aroonraj) said 4xStar: > I've been testing this the past week and it is amazing how predictive it can be. I suppose the trick is to keep the neural network ‘trained' as you call it … can anyone learn to do this or does it require some advanced programming knowledge. (I have some basic programming skills … not advanced!) To train a network, programming skills are not necessary (unless and untill you want to do in metatrader) as it is possible to use any of the free neural network simulator softwares on the net to train the network. The only requirement is to export necessary data from Metatrader to that software. @aroonraj (aroonraj) replied aroonraj: > Hello Everyone, > > I was away from my computer for a couple of days and was not able to do the updates as planned previously but finally I made it to program the modifications I wanted to do. > > [B]Important update is that the network is trained with June and July history data.[/B] > > Best Wishes, > Arun [I][B]Note: Read the installation instructions that is included in the zip file. Feel free to ask me if you were not able to install it properly.[/B][/I] After which, @daedalus (daedalus) added I'm amazed and impressed by this thread! I've done some light reading on neural network systems over the years but never seen one actually built and implemented. I'd love to see some more screenshots of the signals you guys are generating. Cheers! @nabil114 (nabil114) replied Automated Trading Championship 2008 if you see the top two eas are neural network based so it getting some steam. click on 2007 After which, @aroonraj (aroonraj) added nabil114: > Automated Trading Championship 2008 if you see the top two eas are neural network based so it getting some steam. > click on 2007 That motivates me to work more and improve my system but frankly speaking I am finding a bit difficult to find time to test various indicators. How is your system working??? Do you have some results by now. Then @Pegasus200 (Pegasus200) said Arun, I have worked with NN during my master's thesis and I have good experience with them. I just don't have the time right now to do my own tests on Forex market. I think that you could use Jurik's non lag (and smooth too) indicator tools for the NN inputs. I think of JMA 5 with phase around 0 and JRSX to replace you EMA and RSI. (If you need the Jurik indicators, look at the Metaquotes web site and look for NK_library). Of course you can add Demarker and ADX and I think you should have a longer set of past inputs. I would try from 5 to 10 past values. Just my 2 cents on this one… Also, the output of the NN could be the following: Use a JMA (5 to 15 period, to be tested) angle indicator (JMA5(n)-JMA5(n-1) for example) that is normalized between -1 and 1 so it will fall into the activation function range (I believe you are using sigmoid or tanh). Now shift this indicator 2 to 3 bars to the past. Use the shifted values as your training set (desired output). You could also set 3 trig points in the angle to define sell, no trade and buy signal. If you have a sigmoid activation function that goes from -1 to +1, the output values from -0.3 to -1 gives you a sell situation, from -0.3 to 0.3, gives you a “no trade” situation and from 0.3 to 1 you have a buy situation. This is just food for thought as you go along. I think that predicting buy and sell signals is simpler to trade and to automate eventually. @nabil114 (nabil114) replied aroonraj: > That motivates me to work more and improve my system but frankly speaking I am finding a bit difficult to find time to test various indicators. > > How is your system working??? Do you have some results by now. it is very rule based it works. i made around 378 pip back testing! i really didnt like win ratio and i am try to simplify my rules. i have exams now i probably post my result for 17 - 23 and see if things got better. Just let you know it was ran against three pair, eur/usd, usd/jpy, and gbp/usd. win ratio was 51% Then @aroonraj (aroonraj) said Pegasus200: > Arun, > > I have worked with NN during my master's thesis and I have good experience with them. I just don't have the time right now to do my own tests on Forex market. > > I think that you could use Jurik's non lag (and smooth too) indicator tools for the NN inputs. I think of JMA 5 with phase around 0 and JRSX to replace you EMA and RSI. (If you need the Jurik indicators, look at the Metaquotes web site and look for NK_library). Of course you can add Demarker and ADX and I think you should have a longer set of past inputs. I would try from 5 to 10 past values. Just my 2 cents on this one… > > Also, the output of the NN could be the following: > > Use a JMA (5 to 15 period, to be tested) angle indicator (JMA5(n)-JMA5(n-1) for example) that is normalized between -1 and 1 so it will fall into the activation function range (I believe you are using sigmoid or tanh). Now shift this indicator 2 to 3 bars to the past. Use the shifted values as your training set (desired output). You could also set 3 trig points in the angle to define sell, no trade and buy signal. If you have a sigmoid activation function that goes from -1 to +1, the output values from -0.3 to -1 gives you a sell situation, from -0.3 to 0.3, gives you a “no trade” situation and from 0.3 to 1 you have a buy situation. > > This is just food for thought as you go along. I think that predicting buy and sell signals is simpler to trade and to automate eventually. Thanks for your thoughts and suggestions. Infact, my first version was based on JMA. Neural Networks normally generalize the model that is to be trained and mixing lagging indicators with JMA really did not work in my case. From your experience, can you suggest me any other indicators and the amount of data I should take in to consideration for training. I mean how many months of data you think necessary to train a network. Then @Pegasus200 (Pegasus200) said Arun, Sorry in advance for the lenghty post !! Training is certainly a very critical part in the network developpement. As you probably already know, you don't want to overtrain it as it will memorize the data instead of predicting it. I still think that you should add more past values of your EMA derivative. I would also include the second derivative of EMA (i.e. [EMA(n)-EMA(n-1)]-[EMA(n-1)-EMA(n-2)]). Let's say that the EMA is the position of a car on the road, the EMA derivative gives you it's speed and the second derivative gives you the acceleration. This is a good characterization of what the car is doing. Also, I think that adding a volatility indicator could improve the result. You could use the upper Bollinger band minus the lower Bollinger band value. Another one could be the ATR but I must say that I prefer the JATR since it reacts quicker and it's smoother. I added the indicator if you want to try it. I also think that including the derivative of the RSI or stochastic could lead to interesting results as they show quickly when price action is changing direction. The network should be trained using different periods. For example, you could use three periods for training, The first one could be a period where the currency was mostly trending up, the second when it was mostly trending down and the last one when it was going sideways. This way you would be less likely to have a network that performs well only in certain market type. I would look at the residual error value and as soon as it starts to show convergence (mean error stops going further down), I would stop training. It could be hard to achieve if the software you use cannot give you the mean error of the training. You could also train the network using one period and then try it in a different period (aka testing period) to see if it is still giving a good signal. This is what you are doing already but I think that a plot of the error in the testing period could reveal if your network is optimally trained. I also think that probabilistic NN (PNN) should be taken in consideration. They train quite fast so cycle of trial and error are shorter. I believe that the forex market has some cahotic behavior that is more suitable for probabilistic solutions. They also have less tendencies to hang in local minima and tend to go to global minima. The nuber of neurons on the hidden layer can also have a dramatic impact. It must not be overlooked. I just can't give you a numer. Usually you have about twice the number of your inputs on the hidden layer. Finally, as I have mentioned before, these are only suggestions and I can't promise that they will improve anything. I just don't have the time to get deep into it. Which software do you use (FANN, Cortex, Matlab, NeroShell…) ?? If I get into this later, I think of using Matlab since it has all the power and I know this beast quite well… Thanks for your work… So @MoreYummy (MoreYummy) replied very good idea. Im going to follow this. To which @aroonraj (aroonraj) replied Hi, First of all thankyou for your excellent ideas. You seem to have a good foundation from your thesis work ;-). I am slowly seeing light in this thread with in-depth discussions on the topic. I am using the Uni Stuttgart SNNS or to say its successor JNNS to train my network. Do you have experience with this tool by chance??. I choose it as it is free, easy to learn and has various implementations of the algorithms. I have some experience with Matlab but not in training neural networks. Right now I am really satisfied with SNNS as it has all the required tools and plots. There is an error plot view which I really like and use to stop my training when the training and validation data have a global minimum. I stop the training a bit before the plot flattens which indicates that the network is starting to memorize. My long term plan is actually program the training algorithm also in mql. Right now I have implementation of a network creation and forward propagation which is included in NeuroTrend. Pegasus200: > I would also include the second derivative of EMA (i.e. [EMA(n)-EMA(n-1)]-[EMA(n-1)-EMA(n-2)]). Let's say that the EMA is the position of a car on the road, the EMA derivative gives you it's speed and the second derivative gives you the acceleration. This is a good characterization of what the car is doing. This is really sparkling. I liked the way you explained taking speed and acceleration as example. I should implement this as soon as possible. Also using a volatility indicator might be helpful as you said. One of my experience and also as I read in some publications, It is not much helpful to add more past data. My tests showed that it is enough if the inputs are that of t, t-1, t-2, t-3. As you might have noticed during training, outputs are of t, t-1, t-2 and inputs are of t-3, t-4, t-5. Do you think forecasting t+1, t+2, t+3 is a right model? I am planning to reduce and extend it to t, t+1 but for two EMA's ie EMA5 & EMA 10. I am not sure but I think it might help to forecast a EMA cross over (mean two EMA's) rather than forecasting 3 future outputs of one EMA. What is your opinion on this. Pegasus200: > The nuber of neurons on the hidden layer can also have a dramatic impact. It must not be overlooked. I just can't give you a number. Usually you have about twice the number of your inputs on the hidden layer. Concerning the number of hidden layers. According to some publications, it is enough to have a single hidden layer for most of the applications. Right now I use only one hidden layer but the number of neurons (units) depends on my number of inputs and outputs. I start with H = (I+O)/2 ie… number of hidden neurons is half the sum of number of inputs and outputs. In SNNS one can also prune the network, but I haven't tried this as I am not sure of the good pruning algorithms and also in SNNS pruning does not work for all the training algorithms. I would really appreciate if you can join me and keep giving your suggestions and opinions. Are you a full time trader??? I think if we collaborate on this we can surely come out with a good NN based indicators and bring some light on others to join hands. I try to spend at least 10hrs per week on my interests (programming and developing a NN based indicator) apart from my regular job. If more people join we can test different combinations of indicators and analyze whats good and whats not for NN based forecasting. Thanks for your input, Arun After which, @aroonraj (aroonraj) added Pegasus200: > I also think that probabilistic NN (PNN) should be taken in consideration. They train quite fast so cycle of trial and error are shorter. I believe that the forex market has some cahotic behavior that is more suitable for probabilistic solutions. They also have less tendencies to hang in local minima and tend to go to global minima. > Thanks for your work… Could you refer me to some literature about probabilistic neural networks?? Does it require changes in the implementation of the network or is it more dependent on training algorithm??? To which @Pegasus200 (Pegasus200) replied Arun, Again, this is a lenghty post… sorry but due to the
{'source': 'discourse', 'url': 'https://forums.babypips.com/t/neural-network-ema-system-neurotrend/14802', 'title': 'Neural Network EMA system (NeuroTrend)', 'views': 151678, 'has_accepted_answer': False, 'word_count': 25620, 'like_count': 0, 'reply_count': 2, 'participant_count': 58, 'posts': 181, 'tags': '', 'author': '@aroonraj (aroonraj)', 'participants': '@aroonraj (aroonraj), @bnbb2004 (bnbb2004), @nabil114 (nabil114), @4xStar (4xStar), @johnnykanoo (johnnykanoo), @AndreasF (AndreasF), @ewokuk (ewokuk), @mrpro (mrpro), @unFinisHeD (unFinisHeD), @longboy (longboy), @sumwatt (sumwatt), @daedalus (daedalus), @Pegasus200 (Pegasus200), @MoreYummy (MoreYummy), @ydaudw (ydaudw), @iamvoodoo (iamvoodoo), @mkurzawa2 (mkurzawa2), @sam123 (sam123), @getsumpips (getsumpips), @rikhart (rikhart), @CA1962 (CA1962), @Ilovepippin (Ilovepippin), @adimsh (adimsh), @criss73 (criss73), @rohyani (rohyani), @qipan (qipan), @MadCow (MadCow), @lumanauw (lumanauw), @stever1k (stever1k), @auto9817 (auto9817), @daytrader65 (daytrader65), @allangering (allangering), @Mazda (Mazda), @kevinx72 (kevinx72), @tretonis (tretonis), @heikob (heikob), @indoprofit (indoprofit), @K16999 (K16999), @boruo72 (boruo72), @panda21 (panda21), @JRowe (JRowe), @alualdi (alualdi), @sensaven (sensaven), @byc2002 (byc2002), @jaayazan (jaayazan), @arjang (arjang), @gigibiasi (gigibiasi), @ovanwijk (ovanwijk), @tek862 (tek862), @hsngs14 (hsngs14), @bayu (bayu), @kiran242526 (kiran242526), @Elroch (Elroch), @flikofloko (flikofloko), @TradeViper (TradeViper), @bsoberoi (Bsoberoi), @Falstaff (Falstaff), @rms83 (Rms83)', 'image_url': [None], 'created_at': '2008-07-19T23:30:01.000Z', 'last_posted_at': '2018-08-21T15:26:55.199Z'}