The OptimalF function calculates the optimal quantity of contracts to bet on using to R. Vince’s method. This function can be used in Quantity expressions for entry and exit definition.
Mathematics:
Where:
b = win/lose ratio per contract
p = probability of win per contract
Note: The account equity here isn’t constant and depends on previous trades results.
OptimalF Parameters
Parameter |
Description |
startAE |
The Start Account Equity, or initial amount of money (in symbol currency). For example, for U.S.-traded instruments, this would be dollars). |
tradesReq |
The number of trades required to assure that the results obtained are good. TradesReq always uses the true entry count, not the number of contracts traded, since a Trade System could be set to be by contract or share. It is recommended that this value be set at 30 or more. |
defF |
The value to return while the trade count is less than TradesReq. |
Which Trades |
Specifies the type of trades which cause the count to begin: All Trades = total of the corresponding values of all trade system’s trades Long Trades = total of the corresponding values for trades that are set to Use as Long Short Trades = total of the corresponding values for trades that are set to Use as Short This Trade Only = this specific trade only Specific trade name = a specific trade, identified by name |
Closed Trades Only |
If selected, the calculations use only closed trades. |