Personal Online Notedesk

Site Blog

Evaluating the system: Part 2

Posted on January 6, 2011 at 4:00 AM

The parameters of the trading model have already been set. A sample of data was drawn from a period in the past, in this specific case, 1/2/1990 through 3/31/2000; this is the out-of-sample or verification data. The model was then run on this out of- sample data, and it generated simulated trades. Forty-five trades were taken. This set of trades can itself be considered a sample of trades, one drawn from the population of all trades that the system took in the past or will take in the future; i.e., it is a sample of trades taken from the universe or population of all trades for that system. At this point, some inference must be made regarding the average profit per trade in the population as a whole, based on the sample of trades. Could the performance obtained in the sample be due to chance alone? To find the answer, the system must be statistically evaluated.



Trading Strategy:

  • System name: Directional RSI.
  • Alert when the Positive Directional Movement Index moving above the Negative Directional Movement Index.
  • Buy when the Relative Strength Index crosses above 50.
  • Sell when the Relative Strength Index crosses above 70.
  • Directional Movement Index parameter: 5.
  • Relative Strength Index parameter: 8.
  • Time frame: daily.
  • Initial equity: $ 10,000.00.


System function:


var Bar: integer;


for Bar := 1 to BarCount - 1 do


  if not LastPositionActive then


  if GetSeriesValue( Bar, DIPlusSeries( 5 ) ) > GetSeriesValue( Bar, DIMinusSeries( 5 ) ) then

    if CrossOverValue( Bar, RSISeries( #CLose, 8 ), 50 ) then

      BuyAtMarket( Bar + 1,  'Buy');




    if CrossOverValue( Bar, RSISeries( #CLose, 8 ), 70 ) then

      SellAtMarket( Bar + 1, LastPosition, 'Sell' );




Trade History:

Categories: Articles