Ticaret robotlarını ücretsiz olarak nasıl indirebileceğinizi izleyin
Bizi Facebook üzerinde bulun!
Fan sayfamıza katılın
Komut dosyasını ilginç mi buldunuz?
Öyleyse bir link gönderin -
başkalarının da faydalanmasını sağlayın
Komut dosyasını beğendiniz mi? MetaTrader 5 terminalinde deneyin
Kütüphaneler

Optimal F for MQL5 (per Ralph Vince) - MetaTrader 5 için kütüphane

Görüntülemeler:
5824
Derecelendirme:
(22)
Yayınlandı:
2018.09.23 23:26
Güncellendi:
2018.10.23 12:57
\MQL5\Include\
Bu koda dayalı bir robota veya göstergeye mi ihtiyacınız var? Freelance üzerinden sipariş edin Freelance'e git

I couldn't find MQL5 code for the Kelly Criterion, so I decided to write it myself; but it turned out that the Kelly Criterion only works for Bernoulli Distributions. This means it works only for fixed profits and losses, i.e. fixed SL and TP, but I rarely do.

So, based upon the work of Ralph Vince's book The Mathematics of Money Management, and borrowing concepts from python code I found online, I created this MQL5 library for Optimal f.

I am including test(s) that I used to verify that my code gives the same results as the example in Ralph Vince's book. That is: +9, +18, +7, +1, +10, -5, -3, -17, -7 .

Note: I set GEOM_MEAN_MIN_TRADES = 0 to have the unit tests run.

Note: This calculates Optimal f only. It does not show how to calculate a position size. That part is up to you.

Note: This code is provided for testing and edification only. UNDERSTAND THE MATHEMATICS BEFORE USING THIS ON A REAL TRADING ACCOUNT! It's highly possible you will wipe out your account if you don't know what you are doing.




Triple fast ema Hull Triple fast ema Hull

Triple fast ema Hull

Fast ema Hull average Fast ema Hull average

Fast ema Hull average

Super smoother Super smoother

Super smoother

Super smoother levels Super smoother levels

Super smoother levels