HighTick
Van K. Tharp's System Quality Number Function
Van K. Tharp proposed a formula for System Quality Number that measured strategy performance and could be used as a custom objective for optimizing strategy parameters. The formula was presented in his recent book: The Definitive Guide to Position Sizing, published August 2008.
Typical UsageThe function is called from a strategy when the LastBarOnChart is reached.
Code DescriptionThe function uses all inline code, uses a faster algorithm for calculating Standard Deviation than the Tradestation's builtin StdDev function, and trade information passed to it in an array, TradeArray. It is called once at the end of a each strategy run, when the LastBarOnChart condition is reached. The TradeArray may be loaded with all strategy trades using function LoadTradeArray. A description and code for the LoadTradeArray function is referenced below. The System Quality Number value can be output, using FileAppend, along with other strategy performance statistics to optimize strategy input parameters beyond the builtin objective functions that are available within the Tradestation optimizer. Downloads
Initial posted version: 09/14/09
The LoadTradeArray function may be found here: Loading Strategy Trades Into An Array
