SpiNNaker - A Neural Network EA
This is an early version of a forward feeding perceptron with four inputs: Stochastics 5m, Stochastics 15m, ADX 5m, ADX 15m. It has two outputs: buy, sell.
A perceptron is the most basic kind of neural network you can find, or at least that is practical.
This is hopefully the beginning of a development cycle that will include forum member input from both users and programmers alike.
Training Using Optimization
You need to manually train this NN by optimizing all the NN weights and NN thresholds in the backtester. Please do not email me asking me how to teach you how to do this. There is good documentation on this forum to teach you how to do this.
You need to optimize both the buy and sell weights, for example w1b and w1s which correspond to "weight 1 buy" and "weight 1 sell", all the way to w4b and w4s. I suggest optimizing them from 0.1 to 0.9 for the buys and -0.1 to -0.9 for the sells in steps of 0.1 for each.
In fact, do not change the sell weights from negative. You will make the neural network give bad signals.
You also need to optimize ThresholdBUY and ThresholdSELL, for example try optimizing from 1.0 to 3.0 in steps of 0.1 for each.
When you are optimizing, both thresholds are being tested in the positive, but during use one of them is negative and the other is positive. The thresholds are inversely proportional and the trade signal comes from the one that is positive and past it's order placement threshold. The close order signal comes from an order existing and the output falling below your optimized threshold.
Pick a very short test period at first till you get used to it, say 3 or 4 trading days that look similar to whatever your charts look like right now. Under "Model" choose open prices only, since this EA trades on a new bar.
I wrote this EA with the intention that it be attached to a 5 minute chart, although it uses both 5 minute and 15 minute data.
I wrote this EA with the EUR/USD in mind. That doesn't mean you won't be able to find another currency pair that it does well on.
Initial forward testing seems to indicate it does better during trending markets and less well in markets that are changing momentum.
Please don't post umpteen million backtests of this and that setting.
Forward Testing & .set files
Please share your forward test results and your .set files that correspond.
It's taken me quite a while to understand how neural networks work and why they in fact do work. It probably longer than it should have but I've been raising my son and programming on the side.
I wanted to include everyone in the development of this EA in the hopes that it will provide benefits to people everywhere. As always, best of luck trading!
dowloaded & try it
I have been abusing it with testing and now working on forward testing.
Note: I only use it forward testing by enabling only buy or sells in the direction of the trend and with manual confirmation.
regarding the ea..
just noted that you are not addressing the retraining problem here. is your intention to only train the ea once?
actually, we should do datamining on NN and EA
to see which trading period , whcih currencies pairs that it really work -- which one does not
there will be underlying assumptions for each sydtem that we do not know from the description of each one
-- if we make the assumption that , indicator, EA we saw is PROVENed already, we are usually wrong (say 40% of the times) -- this refer to things we saw, in general, not any particular one
I would recommend retraining every 3-4 trading days, even more often if you prefer.
Thank you for the post.. I wonder if we can change the indicators in this. I haven't really given NN EA's a shot yet.
Sure, change the indicators to whatever you feel you can be productive with. I gave the source code so people could adapt any trading ideas and have a basic package that people can build things from.
I'm in the middle of working up a way to stay out of sideways markets by using ADX on the longer timeframes, say 4h or 1d even. I think I can help it stay away from times of changing momentum during the longer trend distribution phases where price action sometimes gets unpredictable like today with the EUR/USD.
Anyway, in the source code you'll see the section where to put your indicators and the section to get signals from those indicators. You can then feed those signals into the NN on whatever timeframe you want, you can even add more timeframes than was included in the original version I released.
Download 0.50b, I found a bug in 0.50a that feeds the wrong data into one of the input neurodes.
IBFX and EA
I am using IBFX 5 digit. I have not been able to get the ea to open any trades. I have looked in the journal and do not see any errors. Any help would be appricated. Thanks for the ea, I have use other nn programs before but have not coded any.