1) there is an error in NthHighestBar , here is the correct code and give it a different name: (NhighestBar) (you cannot save it under the original name due to that it is read only)
=======================================
Inputs: Nth(NumericSimple), Price(NumericSeries), Length(NumericSimple);
Array: PriceArray[100](0), BarNumArray[100](0);
If Nth <= Length AND Nth <= 100 Then Begin
For value1 = 0 To Length - 1 Begin
PriceArray[value1] = Price[value1];
BarNumArray[value1] = value1;
End;
For value1 = 0 To Nth - 1 Begin
For value2 = value1 + 1 To Length - 1 Begin
If PriceArray[value2] > PriceArray[value1] Then Begin
Value3 = PriceArray[value1];
PriceArray[value1] = PriceArray[value2];
PriceArray[value2] = Value3;
Value3 = BarNumArray[value1];
BarNumArray[value1] = BarNumArray[value2];
BarNumArray[value2] = Value3;
End;
End;
End;
NHighestBar = BarNumArray[Nth - 1] + CurrentBar - BarNumber ;
End
Else
NHighestBar = -1;
=======================================
2) TS2000i is good for daytrading. But if you are scalping and working with only a few ticks profit then the backtesting results are faulty. This has to do with the fills: When you do a market order you will (almost always?) get the worst fill. It will calculate it as that 50% of the time it will get the ask and 50% the bid.
3) if you use limit orders then you will not always be filled - there may be only one trade at that price.
4) aim for a P/F of at least 1.3 or more, suggested value 1.6 or more.
To be realistic you'll have to add two ticks to TS results for each trade (winners and loosers). If you position trade intraday and place a limit order early for profit target then you can reduce it to 1.5
good luck
Marinus