Any tips on creating profitable bots?

Hi all

I just really want to know if anyone has managed to program a profitable robot on MT4 and what are the right ways to going about it or if you may have any good templates to share?

Many thanks!

There are a couple of experts around that will hopefully give you some very good suggestions, but generally I think the trick is to use them as an aid to trading, rather than switch them on and just expect them to work.

For example, you might have a trend trading bot, so you might use your discretion to see how trendy the market is, or you might have a Fibonacci strategy, in which case you might place the Fibonacci yourself and let the bot trade from that.

1 Like

I agree with PP’s comments. Mechanical systems fail consistently, but there is a lot to be gained in a semi-automated assistant.

1 Like

No bot will work all the time.
Why?

  • market volatility changes (Vix today vs. 2005)
  • price spikes (Swiss govt caps exchange rate)
  • market conditions (trending vs ranging)

All bots, if effective at all, can be managed to profit
How?

  • recalibrate frequently (tailors parameters to mkt vol)
  • only trade the bot if recent backtests suggest it works in the current market

Evidently the calibration process and paying attention to the market takes some time and judgement. Hence there’s no ‘plug and play’ way to leave the pc unattended and sip margaritas.

Thanks, almost a month on, I’ve changed my view. I’d rather trade manually at my discretion, so if I take a bad trade at least I can blame myself! :stuck_out_tongue:

So, just build a bot that can take these things into consideration… based on statistical variations over a set period of time, and you have a bot that works well the vast majority of the time. In other words…the bot can recalibrate itself if you can define “trending” and “ranging”…for it to look for.

Not a simple task by any means IMO…but completely doable (cuz i know a guy that’s done just that)

or build a bot that doenst’ need to factor in these things to make a profit.

Say, hypothetically, any time the euro/usd sells off 40+ pips in 5 minutes, but gbp/usd only sells off 10 pips in that same time period…buy the first time you get a 5 minute candle that dones not make a lower low than the previous one. Set a 30 pip stop, and a 30 pip target.

This type of idea will work regardless of trend. it just works.

sure, it will have MORE success if that selloff is against the trend… but it’ll work regardless often enough to let it run all the time.

that being said…no idea if this particular example would work. test it. whoe knows. but it’s this basic concept that HFT firms use all the time to make money, usually every week of the year.

It does take some recalibration…but I know of at least one person who has been able to do this with only once a week calibration. the rest of the time, the bot recalibrates itself. it’s sophisticated, and it has several core functions all designed to identify different market conditions, and volatility changes. (in fact, I think he uses the VIX for a bot he trades the S&P emini futures contract with! along with volume, price action, a 14 day average true range value to determine stop and exit points) and trend)

This is not to say you can set it up, and leave forever. but…it allows say…checking as little as once a week or once every few weeks in some cases, making a few adjustments, and being done.

Agreed - you could code the recalibration into the bot. Some of the recalibration takes judgement though - if you have time periods with price spikes (like the swissy under government intervention on Sept 20th) then you might want to override the recalibration routine output. Of course, you could filter for price spikes, or take the view that similar spikes might happen again soon. But this piece of your risk appetite seems to me judgemental rather than programmable.

true elegy…the bot will NOT account for everything. but, lets keep it real.

other than the 1 - 4 times a year japan yen intervention, and the swissy just recently… there are very very few interventions on such a direct level.

Everyone always seems to get so concerned about these things happening…but for the very few people i know that trade using bots successfully, not a one of them has ever voiced a concern about “spikes”.

strange and odd extreme varations will happen. but not most of the time. these are exceptions.

and i’m pretty sure these are losing trades for the bot guys. ok. so the increase their loss rate by 1% by not accounting for this stuff.

oh well. if you need that 1% to be profitable…your bot isn’t gonna work anyway.

Jay

Just my 2.4 pips:

If you need to recalibrate a bot, it’s a curve fitted bot which is too complicated. Too many settings. Too many variables. Likely to fail in the future.

Take for example the turtle rules from I don’t know xx years ago. Simple mechanical rules, never to calibrate and them worked and still work if you use a longer period like say 80 days. Just take the turtle rules, shrink wrap them into a bot and there you are.

KIS(D)S is the key: Keep it super duper simple. :wink:

My bots never need recalibration. Them just work. Because them have an [B]edge[/B].

I mean, trading is really simple, isn’t it? You buy low and sell high or vice versa. Like Wal Mart does, lol. Or you can even make money with buying high and selling higher or vice versa. You just have to avoid buying highest and selling lowest. LOL! :smiley:

Well, i am really exceptic about auto trading, however i’ve been working in neural systems and they are a great tool. A neural system requires a learning face when you just give inputs and the system works for you and you tell whe is right and when is wrong. I don’t know if mt4 allows adjustables arrays or if it has to be storaged on brokers server, if it can be ran on your computer, fine, try it, but if you must run it on brokers server, forget about it. Never give your most valuable assest to your broker, especially if it’s a MM.

Regards.

Probably the best post I’ve ever seen here, and I’m in 100% agreement with everything you say.

Anyone who actually makes their living from automated trading will probably agree that walk forward optimisation of trading robots is NOT the way to go, its almost a guarentee of failure. There’s a considerable amount of research out there that suggests that fading walk forward optimised bots is a far better strategy, although from what I’ve seen the varience in returns is absolutely brutal.

Im currently programming a EA right now, although not very good at it, but I can do them, just cant seem to get hem to be Live ready…

ANyways, My strat is great, but My Mind isnt. I can turn that into a EA, and it will do the same thing I would do, as If Im sitting here. The one greatest thing about the EA, IMO, Is timing and speed of entry. The EA wont miss them, where as I have a 75% chance to miss it, because I have alot of varibles to trigger a trade. I can fine Tune it adjusting my periods and things like that. Im hitting 54% balance increase over 23 or so trades, no loses…

Even if you just turn the EA on in the morning, get your target, and turn it off. Mine currently will trade at the time I want it too.

Its sorting out the noise, and the crappy ranging price action that stumps the EA’s//

Sorry to take away from the thread, but MoneyNVRSleeps, do you have experience in programming EA’s?

Do you mind helping me out with something? It’d be really appreciated, give me a PM if you can.

Regards,
Clark

Jay - we are in agreement. Spikes like swissy or march samurai are rare. Right now with euro meltdown you might think another spike is possible is all, and decide to take a few weeks out of certain trades. Now you’re spot on that history would argue that such a strategy misses out on more chances than it avoids risks. I was just putting the case for making sure your logic that drives the 'bot is still valid.

Well, Im done with My EA, I just cant get it to work for real accounts, anyone know how?

What’s wrong with it?

Hey Clark, nothing now, i got it working, and you know what, it took my 6 months to get it figured out.

How did you start creating your ea?