Random entry EA - page 4

 

Hi iGoR,

Backtest results in MT always gives the same random numbers for some reason, especially if the ea depends entirely the out come of the rnd gen, otherwise if its combined with indicators like in the Paradox EA the results are diff all the times. So we are just doing forward test at the moment. If you know of a way to generate random numbers in MT that will be random in backtesting please let me know.

thanx

 
bobfourie:
Hi iGoR,

Backtest results in MT always gives the same random numbers for some reason, especially if the ea depends entirely the out come of the rnd gen, otherwise if its combined with indicators like in the Paradox EA the results are diff all the times. So we are just doing forward test at the moment. If you know of a way to generate random numbers in MT that will be random in backtesting please let me know.

thanx

You should try to use MathSrand() before any call to MathRand(), maybe in the Init() func, and to use TimeLocal() as seed.

void MathSrand( int seed)

The MathSrand() function sets the starting point for generating a series of pseudorandom integers. To reinitialize the generator, use 1 as the seed argument. Any other value for seed sets the generator to a random starting point. MathRand retrieves the pseudorandom numbers that are generated. Calling MathRand before any call to MathSrand generates the same sequence as calling MathSrand with seed passed as 1.

Parameters:

seed - Seed for random-number generation.

Sample:

MathSrand(TimeLocal());

// Display 10 numbers.

for(int i=0;i<10;i++ )

Print("random value ", MathRand());

 
bobfourie:
Hi iGoR,

Backtest results in MT always gives the same random numbers for some reason, especially if the ea depends entirely the out come of the rnd gen, otherwise if its combined with indicators like in the Paradox EA the results are diff all the times. So we are just doing forward test at the moment. If you know of a way to generate random numbers in MT that will be random in backtesting please let me know.

thanx

When you generate a random number in MQL using the MathRand function it always generates the same sequence of numbers, unless you use the MathSRand function first to set a seed value (I usually use the value of the curent time to do this, so each time its called I get a different seed value)

To be honest, Ive never backktested any of my random EA's cos I dont trust the backtester

I havent checked the EA so you may already be seeding the random generator correctly, but thought I'd mention it

 

I have been using TimeLocal() and have also tested GetTickCount() as seeds, both give back the same results in backtest. thanx for the input

 
Files:
 

I hope most have enough sense to figure out that a random entry and exit strategy will NOT be profitable consistently. It is just a good exercise on MM and Trade Management, nothing more. If you are trying to figure out how to make an edge out of a random system, then you are wasting a lot of time. Instead you should be focusing on MM and trade management with a random entry, and take what you learn there to the next level, which is to apply it to a system with an edge.

Do not think the market is 100% random, instead think the market is 90% random. This is a more realistic view, and makes more sense, and correlates well with the % of successful traders.

 

Kenny, I'm going to have to object to that but reasonably I accept your opinion.

I have an excel model that models out 3,900,000 different possibilities of a trade. Now if you only win 50% with very little ROI, it is extremely profitable- Depending on your MM along with theory used to "randomly" enter markets.

I think we should really define "random" entries as entries that are not specifically based around a trading strategy, but is placed more on pure 100% probability.

Kenny Rogers:
I hope most have enough sense to figure out that a random entry and exit strategy will NOT be profitable consistently. It is just a good exercise on MM and Trade Management, nothing more. If you are trying to figure out how to make an edge out of a random system, then you are wasting a lot of time. Instead you should be focusing on MM and trade management with a random entry, and take what you learn there to the next level, which is to apply it to a system with an edge. Do not think the market is 100% random, instead think the market is 90% random. This is a more realistic view, and makes more sense, and correlates well with the % of successful traders.
 

well, about this time last year, the was a much touted unique ingenious most wonderful MM that was the original idea of a great trader and money manager.

the people in his group (who paid to learn from him) one by one came here to tell others of the wonderful MM they have learned.

they even said that just the MM alone would have been many times worth the fees not to mention the trade system which was making hundreds of pips everyday.

i learned the MM second-hand from a paying member and thought it was indeed a sound MM - money management.

it was about how you manage your capital to survive the ups and downs of your trading career from a MACRO level (over a longger term period).

i realized then money management is not LOT SIZING (which is something that concerns on the MICRO level).

but this year, that same great master who thought of the above ingenious MM, has come out with a new MM.

and this MM is strictly about increasing lotsize to catch up with your losses.

and better still, the pattern to increments has been etched to stone and becomes commandment (and cannot be refuted).

i guess great traders and money managers also have a right to change.

and now it is all talk about MM and random. random entry and random exit.

may be the great master can also devise a pattern (oops! random has no pattern) ok the great master will devise random lot sizes. so you will get bountiful random profits!

but i will tell you one thing i know for sure for this random system - YOU WILL NEED RANDOM CAPITAL.

 

I think "random" in this particular thread signifies that it comes from a random number generator from MT4.

All MM needs is positive expectation. It's an enchancement tool. Not an edge. That was all I was trying to say.

 
Kenny Rogers:
I think "random" in this particular thread signifies that it comes from a random number generator from MT4. All MM needs is positive expectation. It's an enchancement tool. Not an edge. That was all I was trying to say.

Kenny I tryed to explain to you already several times that there is not 1 mechanical system out there that has an edge. Not 1.

All mechanical systems out there depend on the MM to be profitable.

The thousands and thousands of EA and mechanical systems depend on their stoploss and there T/P to be profitable. Without them they have not a profitable system and no edge.

If one accepts that then for all the same you can take a random entry and build an MM on that random entry and forget of all the useless indicators.

regards...iGoR

Reason: