Optimal F in EasyLanguage for TradeStation and MultiCharts
Here is the code for the Optimal F calculation. For a really good explanation of Optimal f, I refer you to Ralph Vince’s Book Portfolio Management FORMULAS. We had programmed this years ago for our Excalibur software and I was surprised the EasyLanguage code was not really all that accessible on the internet. Finding the Optimal f is found through an iterative process or in programmers terms a loop. The code is really quite simple and I put it into a Function. I decided to create this function because I wanted to demonstrate the ideas from my last post on how a function can store variable and array data. Plus this code should be readily available somewhere out there.
VBA version of Optimal F
For those of you who have a list of trades and want to see how this works in Excel here is the VBA code:
I will attach the eld and .xlsm file a little later.