OMX_F_VanTharp (Series Function)
Previous  Top  Next

Summary:
OMX_F_VanTharp is a fitness function that returns a measure of the profit-to-risk ratio standardized over one year. Call this function in the Epilog to compute the fitness value.

Prototype:
 
OMX_Fitness = OMX_F_VanTharp ;  

Parameters:
None.

Function Type: Series
This is a series function - it executes every bar.

Returns (Double)
This function returns a floating-point value from negative to positive infinity, with higher values indicating higher quality returns and lower values meaning lower quality returns.

Description and Use:
This is a modified Van Tharp function. Like the original Van Tharp, this is a time-standardized measure of the profitability of returns. It will assess the quality of your gains over a period of days, weeks or months. Like the original Van Tharp, the higher the return value from this function, the higher quality the returns are over a year. The lower the value, the lower the quality.

Use this function when you want to maximize your returns with a trade-off of moderate drawdowns for higher returns.

Formula:
vantharpformula  
where  
AW
Average Win
PW
Probability of winning
AL
Average Loss
PL
Probability of losing
 

Example:

OMX_Fitness = OMX_F_VanTharp ;  

Bar Validity:
Valid on intraday, daily, weekly and monthly bars. Invalid on tick, volume and point & figure charts.

Notes:
This Van Tharp calculation is a more conservative variant of the original - it is not the standard Van Tharp quality value. This function uses the average losing trade as the standard of risk instead of the minimum losing trade.