SpiNNaker - A Neural Network EA - page 2

 

Magic Numbers - just make sure different magic numbers are used for each currency pair, otherwise they'll open and close each other's orders.

 
willmalou:
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.

I don't know, it's possible with the way you have the weights, it didn't see any trades.

 

Suggesstion

the idea is interesting

maybe you can try this

if stochastic is up and

value is 20 - return 1

value is 50 - return 0.5

value is 80 - return 0

and vice versa and train

but can i check why is your perceptron formula so different

should it be like x = (weight - 100) * value

train from 0 to 200

 

Trend Filter

nittany1:
I don't know, it's possible with the way you have the weights, it didn't see any trades.

Nittany1,

Thanks for your EA.

1-I believe that you need a trendfilter,you suggested ADX on h4 or d1 timeframes,I believe that a simple set of EMA 200 & SMA 200 on h4 will be enough..if EMA<SMA then allow sell orders only,and viceversa....You can use TMA`s or JMAs,but usually,the ema,sma 200 combo is very robust from h1 up.

Additional secondary trendfilters you could add are price action rules,like if H0SMA200 then allow only buy orders,etc,etc....then,within this HPLR FRAME,the NN can devise its magic .

After all,that is what we do at trading,take the high probability and low risk trades,by finetuning entries.

2-Your exit looks good on a conceptual level,have you tried to improve it by changing the timeframe for exit condition to a higher than m15 or lower than m1(this latest probably won`t work,but trying is learning) ?

Regards

S

 

what could be wrong?

Hello nittany1,

Am using Alpari UK and I keep getting (2009.10.16 11:24:26 2009.02.02 09:05 SpiNNaker v0.50b EURUSD,M5: OrderSend error 130) in the journal.

What could be wrong? Am using the default settings.

Thank you.

 

Hi Guys, i m really dont unstd how MagicNumber works, bcos it seems like DOESNT WORK???? I hav made 2 simple EA attached, I m still learning.

1. Buy when price above 60SMA magicnumber 222222

2. Sell when price also above 60SMA magic number 555555

it mean when u attach them to 2 diffrent Eurusd chart, it should one Buy and one Sell same time. As theory, each EA works indepently .

But it doesnt... It seems like when Sell executed 1st, the Buy EA won't work, and vise-versa.

Can anyone recode my EA, the controlling MagicNumber ? Any wrong?

Thanks a lot

Files:
buy.mq4  9 kb
sell.mq4  9 kb
 
nittany1:
I would recommend retraining every 3-4 trading days, even more often if you prefer.

Actually, for neural networks in general it's much better idea to retrain it with a long term data and not sticking with last days.

 
sentaco:
Thanks for this EA going to test it and report about. Regards

hey man megadroid only trade 3 times aweek some times onece aweek don't scam people

 
mikkom:
Actually, for neural networks in general it's much better idea to retrain it with a long term data and not sticking with last days.

Hey,

Yeah, longer term is better for neural networks to a limit. I know it's surprising, but too much data can actually make the forecasts worse. I don't know what you're doing to train the network, but if it were me, I'd be retraining every day, and I'd split the training data up into sets and train off of each set a couple of times. Then again, I don't know how deeply you're involved with the actual network.

 
Ghosthand:
Hi Guys, i m really dont unstd how MagicNumber works, bcos it seems like DOESNT WORK???? I hav made 2 simple EA attached, I m still learning.

1. Buy when price above 60SMA magicnumber 222222

2. Sell when price also above 60SMA magic number 555555

it mean when u attach them to 2 diffrent Eurusd chart, it should one Buy and one Sell same time. As theory, each EA works indepently .

But it doesnt... It seems like when Sell executed 1st, the Buy EA won't work, and vise-versa.

Can anyone recode my EA, the controlling MagicNumber ? Any wrong?

Thanks a lot

Hi,

When you go through the orders, you make a difference between buy and sell order but do not check for the magic number.

quote from your source:

OrderSelect(i, SELECT_BY_POS, MODE_TRADES);

if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {

IsTrade = True;

if(OrderType() == OP_BUY) {

//Close

I would insert the check in the first if-clause

OrderSelect(i, SELECT_BY_POS, MODE_TRADES);

if(OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() != Magic) {

IsTrade = True;

if(OrderType() == OP_BUY) {

//Close

------

Should work better

You can shorten it a little...

You anyway check for OrderType == OP_BUY, so put it in the first if - clause

instead of OrderType() <= OP_SELL

You don't need the second one any more

Gerhard