You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In your tester report you can see that the probability of a profit trade is about 0.9, while the average profit is 10 pips (~1%) and the average loss 20 pips (2%). That is if you open with 0.1 lot of the $1000 deposit at Alpari. So if you vary the lot size (risk) you can get approximate sequences of trades and probability Balances. Again, bluntly pressing F9 will show that these are very good results, it is impossible to drain. Of course, if that's how the trades will be distributed in the future.
That, in a nutshell, is the idea behind this simulation.
I too found inet calculation of quantiles on site ALGLIB.SOURCES.RU. But it somehow appeared not 12 strings at all and one function required calculation of others. I wrote about it in this thread before. So I think the approach used on this site would have slowed down the Expert Advisor. So if you actually have 12 lines of code that do the same thing, then everyone would be interested to read them. I use a quantile table with 3 decimal places. I think that 2 decimal places won't change the whole picture of work, but it will be useful for everybody.
That is why I simply did a series expansion of the distribution function and determined the interval size either in pips (if k=true (i.e. the probability of the price moving up or down)) or in RMS values
I was very surprised that you didn't do that, and now it makes me doubt it all...
And please, if you don't mind, tell me what you mean by the term "quantile".
https://c.mql5.com/mql4/forum/2006/06/kvantil.zip
How to use it in the code is not difficult to guess.
I will make an explanation of the function:
k - key that indicates what is passed to the function in the Par parameter
If k=true, Par is a price and in this case we should also pass into the function the channel parameters relative to which the probability is calculated. The parameters e is the last channel bar and b is the first channel bar.
if k=false, then Par is the deviation expressed in RMS values, and then the parameters b and e are not used.
Canal(Data[],e,b) is a function that calculates the regression and RMS by filling CanalA [] with the obtained values.
And then the decomposition algorithm, which was taken from the http://www.kamlit.ru/docs/aloritms/lgolist.manual.ru/maths/matstat/NormalDF/NormalDF1.php.htm site
MathAbs(s-sum)>0.01 and here you can set the required accuracy
ZSY That you did not do it surprised me a lot, and now it makes me doubt it all...
ZZZY And please if you don't mind telling me what you mean by the term "quantile".
In the phrase "If a random variable can be represented as the sum of a large number" the key word is large. And this word I think refers both to the factors themselves and to the number of observations. In practice, we deal with samples for example from 30 bars up to 1000. In this case it is more appropriate to use Student's distribution rather than a normal distribution. I do exactly that. Although, perhaps we will get the same thing with a normal distribution. I haven't tested it yet.
Honestly, I couldn't understand your code at first glance. How can you take degrees of freedom into account in such a small amount of code? Excel has ready-made functions to calculate quantiles for different probabilities and different degrees of freedom. I use Student's distribution table, not a normal distribution (pp. 53-55 Bulashev).
By "quantile" I mean the same thing as written by Bulashev on pages 18-19 of his seminal work.
Explanation of the function in the post above
So I'd be interested to hear how you apply the Student distribution :)
ZS Unfortunately, in those days, terver was too theoretical to be applied in life.
Well, I've already written above. Just calculating quantiles to build confidence intervals. How else can it be used? Bulashev has written how to calculate these very quantiles in Exxle. In general I have the same file that you posted above, but only for Student's distribution. Here is the difference. Just think how can you apply the normal probability distribution to a sample of 30 bars for example if there are only a few bars? Just compare quantiles of Student's distribution at different degrees of freedom and everything will become clear at once.