Random entry EA

 

Attached is a random entry ea that was post on another forum this looks like a good project for the talented traders and coders to get their teeth into.

This will be a great test for any mm system

Good luck

Please post your mods here

Cheers

Beno

Files:
rndtrade.mq4  3 kb
 

Step 1 would be to add MM parameters (i.e. position sizing based on equity, and a customizable martingale progression, TP & SL params). Possibly a time filter, too.

Just a thought.

MM

Otherwise, it's like playing a coin flip... no edge.

 

Beno,

This EA is actually a very good exercise to becoming a good trader. Because if you really believe in that the market is random, then random entry should not matter. And I do believe many times, the market is very random, just not 100%. But majority of the times, it is.

And I also believe that you can have an EA, and you trade it both way. So you buy and sell at the same time, you can still be profitable on both the long and sells. The secret is money management or trade&risk management. Personally, I subscribe to the trade&risk management over money management. It's basically the same thing just different approach.

 
Kenny Rogers:
Beno,

This EA is actually a very good exercise to becoming a good trader. Because if you really believe in that the market is random, then random entry should not matter. And I do believe many times, the market is very random, just not 100%. But majority of the times, it is.

And I also believe that you can have an EA, and you trade it both way. So you buy and sell at the same time, you can still be profitable on both the long and sells. The secret is money management or trade&risk management. Personally, I subscribe to the trade&risk management over money management. It's basically the same thing just different approach.

I'm with you money and trade managment are similar but trade managment is the most important imho ie your exit. I would like to see this with a hedge. it might be fun

 
Beno:
I'm with you money and trade managment are similar but trade managment is the most important imho ie your exit. I would like to see this with a hedge. it might be fun

Good idea. I was thinking the same thing.

 

I need someomes help I have had a crazy idea of trying to implement a random exit for a random entry system sort of 2 wrongs make a right.

The EA is attached but its does not seen to close the position.

Any suggestions

Cheers

Beno

Files:
 

Gidday right I have gone back to the drawing board and created an EA that has both random entry and exits very interesting, there are a few problems that I'm stuggling with.

the ea open both the buy and sell on the same bar how do I change that.

Could some wiz kids please have a look and make some suggestions as to what i have done wrong

Cheers

Beno

Files:
 

Hi Beno, fixed your EA

Files:
 
bobfourie:
Hi Beno, fixed your EA

Thanks for that but it's not quite what I'm trying to do I am trying to create 2 systems in one, one for the buys one for sells but both with random entry and exit sort of like a random hedge. since I'm crap at coding i'm finding it quite difficult on this one

So any help would be great.

Cheers

Beno

 

EA trades now random with sells and buys. Back testing gives inconclusive results since the seed for the random generator is the local time which is modeled, so its always the same results.

Files:
 

Gidday bobfourie

I am using GetTickCount() as the seed on a 1hour TF

Attached is a back test for what they are worth. in theory the pair and time frame should not matter.

Looks good so far if it carries on like that I might not be so crazy after all LOL

Cheers

Beno

Reason: