Just playing around, mostly..

 

So I've come up with the Bloody Wanker...I figure I call it that enough, it should be its proper name.

It trades MACD cross above threshold with MA and Stoch confirmation, using trailing stops and dynamic lot size. Still needs work, but hey it does kinda run.

Actually it kinda runs itself into the ground most of the time. But hey I'm having fun playing with it, and demo accounts are free anyways.

Any suggestions/edits/arse-whoopings y'all wanna dole out, I'm all ears.

D

 

bloody hell....

 

Do you already backtest that EA? which pairs is most secure?

 

I've got the set file for usdjpy up there, and I've played with it on eurusd also. It runs great for a week or so and then promptly nosedives. HARD.

I've got a sneaking suspicion I've completely borked the macd opening logic...anyone have any ideas?

 

I'm not sure if this is official canon regarding macd, but...it seems to be much more successful when I have it only open BELOW a threshold rather than above it. IE if signal crosses above main between zero and 0.002, it wins. Oddski, no tutorial I've seen yet addresses this...anyone have any thoughts?

Files:
 

A bit off topic perhaps, but I really need to know - which template are you using? I especially like the style

 
TruckerDan:
I'm not sure if this is official canon regarding macd, but...it seems to be much more successful when I have it only open BELOW a threshold rather than above it. IE if signal crosses above main between zero and 0.002, it wins. Oddski, no tutorial I've seen yet addresses this...anyone have any thoughts?

There may not be any tutorial or info cause this is related to your specific ea if it is working better with those settings .. Also do note that if you define a thershold that means you may need to adjust it with the market.

-Guyver

 

No template, all coded by hand. I did "steal" a few snippets of code (the trailing stop logic being the major part I copied) but everything else is basically off the top of my head. I do intend to go back through and reorganize everything to make it more hack-friendly, probably with a separate function for everything to make it easier to add other trading criteria etc, kinda like:

if (macd_buy() && gator_buy() && whatever) {buyme(lots)};

where macd_buy determines if macd has a buy signal and buyme, well, does exactly that and just takes a lot size argument. I just have to get bored enough to do it .

I used to be a network administrator and web programmer (php and mysql feeding xhtml+mp mostly) so that's why my code is as pretty as it is.

I'm kind of thinking of using an upper and lower threshold for macd, and possibly doing away with the "must be above zero" part...guess I'll screw around with it for a while and see what I can get out of it. As it sits though, it did REALLY well back in '08 on H1 timeframe, but otherwise it pretty much blows goats.

One other idea I've been toying around with is a sort of backtest-on-the-fly system whereby the EA is always testing itself to see how it can improve rather than having the trading rules fixed in stone. I love NNs but even they have to be trained and don't "learn on the fly" like what I'm thinking. Learning from its mistakes, sorta thing, is what I wanna implement. Any ideas on this front?

 

That could be interesting if you go with NN's .. you can create a simple model to start with as in MACD weights and it's thershold.. Let the optimizer in MT4 set the proper weights for you. Personally wouln't go into NN's but could be a nice addition for your EA .... One way for learning on fly means looking at history of orders and changing it's mind ... it will require more research and coding and still requires some kind of learning criteria ... i would suggest start slow with NN ..

In the beginning you could try with "and" gate .. later if things gets better add "OR" and "XOR" -- XOR you may never need though

-Guyver

 

well I can't download this 2 files, please give me another ones. Thanks

 

what error(s) do/does you get?