Hello
I have used a tutorial online to create a monte carlo simulation.
The metrics I have:
win%
avg win
avg loss
worst loss
I am trying to add the optimal f to this and then actually run the monte carlo simulation over the optimal f position size.
How can I achieve this?
Any help is greatly appreciated!
Adding Optimal f to win% . avg gain / avg loss
Re: Adding Optimal f to win% . avg gain / avg loss
very briefly, accumulate the elements of optimal f, calculate it, and then add the stat in the after test script, like this:
and here's another
Code: Select all
VARIABLES: index, totalWinTrades, totalLoseTrades TYPE: integer
totalWinTrades = 0
totalLoseTrades = 0
FOR index = 1 TO test.tradeCount STEP 1
IF test.tradeProfit[ index ] > 0 THEN
totalWinTrades = totalWinTrades + 1
ELSE
totalLoseTrades = totalLoseTrades + 1
ENDIF
NEXT
test.AddStatistic( "%Win Trade", (totalWinTrades/test.tradeCount), 0, "percent")
and here's another
Re: Adding Optimal f to win% . avg gain / avg loss
Is there anyway I can do this inside formulas?