I feel like deja vu... I've heard that somewhere before. The generator's not mine, it's MetaQuotes'.
I don't know, but I know, for example, that PHP's MF oscillator is a mess. For example generating zeros and ones you will never get a sequence of 14 zeros or 14 ones in a row. I once played with this too and saw exactly the same picture myself. Perl's got a nice MF.
For the sake of interest try to generate sequence of zeros and ones and find the longest series, I wonder what's the limit in your case
Imho, what's on the bottom picture looks like a result of degeneration of a pseudorandom number generator.
In such experiments a physical white noise generator should be used (ideally, but don't ask me how to implement it in practice :) ),
or at least a more or less decent algorithm like MT19937 - see wiki https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D1%85%D1%80%D1%8C_%D0%9C%D0%B5%D1%80%D1%81%D0%B5%D0%BD%D0%BD%D0%B0
there's a link to a C implementation.
No deterministic algorithm can generate completely random numbers, it can only approximate some properties of random numbers. As John von Neumann said, "anyone who has a weakness for arithmetic methods of generating random numbers is sinning beyond all doubt".
Any PRNG with limited resources, sooner or later it gets stuck - it starts repeating the same sequence of numbers. The PRNG cycle length depends on the oscillator itself and is about 2n/2 on average, where n is the size of the internal state in bits, although linear congruent and LFSR generators have maximum cycles of about 2n. If a PRNG can converge to too short cycles, such a PRNG becomes predictable and unsuitable.
.............
Entropy source | PRNG | Advantages | Disadvantages |
---|
Microsoft CryptoAPI | Current time, hard drive size, free memory size, process number and NETBIOS computer name | MD5 internal statehash of 128 bits (hash is present only in 128-bit Windows versions) | Embedded in Windows, not "stuck" | Small internal state, easy to predict |
---|
https://ru.wikipedia.org/wiki/PRNG
' totally random process and FOREX.
:)
So, the conditions of the problem:
It's a palaver, little more than a complete one. Throw out your definitions of even/odd, and define reversibility in a different way - everything will fall into place. I guarantee it.
The fact that the built-in generator with MT4 is a total crap - it's been known for a long time. It's a standard C oscillator. It has small period (on some sids much less than 2^32) and far from random probability of occurrence of certain bits in number. For simple things it certainly works, but for large series all its "dirtyness" shows up. This can be checked with DIEHARD tests, they are designed to evaluate PRNG quality. Use generator from this archive.
But your problem is not in the PRNG quality, but in questionable even/oddness determination procedures.
And keep in mind, all your scoop will be flushed down the toilet.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
So, the conditions of the problem:
Курс инструмента задается следующим образом.
В начальный момент цена равна 1.0000
В каждый новый тик кидается монетка, если орел p = p*1.0001, если решка p = p/1.0001
Спред равен 2 пипсам. Трейдер обладает суммой в 100000 долларов. Максимальное плечо 1:100
Доказать, что в данной ситуации для трейдера не существует прибыльной стратегии.
The problem conditions were taken from Elita in his trader's problem thread on the forum http://club.investo.ru/viewtopic.php?f=29&t=126082
I supposed that the accumulative value of the asset regardless of a number of throws will not manage to overcome the corridor around the base price 1.0000. On this basis, a rebound system could be built. After this assumption, I was publicly ridiculed by adepts of SC: http://club.investo.ru/viewtopic.php?f=29&t=126082&start=75 (I use the nickname Bazil there) My arguments that one can buy at the low point and sell at the low point of the range.
I have decided to generate 1 000 000 ticks, and if we increase them at least 8-10 times, we will see a holy phenomenon of his majesty Random Walking.
The chart was generated by a simple system based on adding 0.0001 to the total value if an even number was rolled and subtracting 0.0001 if an odd number was rolled.
Well, I decided to be more reasonable and generated 1 000 000 ticks creating a candlestick chart in Excel. Each candlestick contains 10 000 ticks. And voila, I saw something that confirmed my guesses about the impossibility to break the stochastic barrier. It really was an amazing picture:
The chart shows one hundred candlesticks with 10 000 ticks each, or 1 000 000 ticks. The limits are so clearly marked, that it seems as if these candlesticks are "mirrored". Perhaps this is one of the properties of stochastic processes - incredible stability of the system on large volumes of values.
All counterarguments of the SF adepts (especially of the Elite) boiled down to one: "the generator is corrupted because it is a broker and everything that comes from the broker is the universal evil". My comments that the generator is not a brokerage generator but a methaquot one went unheeded. After the doubting adept of CC solved the same thing, but with C++ generator, he was unpleasantly surprised by the result (the result is somehow coincided:). In general, communication with them gives the impression as if brokers only make hollow oscillators to lead the public by nose.(http://club.investo.ru/viewtopic.php?f=29&t=126082&start=90)
Obviously, having such a wide and clear corridor it will not be difficult to create a profitable strategy, even taking into account the commission charged.