[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trading Systems That Work by Thomas Stridsman



PureBytes Links

Trading Reference Links



Hi,
I have first encountered the ideas of Thomas Stridsman through ActiveTrader 
Magazine this past December . I felt that he offered some interesting methods 
and bought his book.
Trading Systems That Work: building and evaluating effective trading systems 
/ by Thomas Stridsman
His trading system code is written for Tradestation and he analyzes thisdata 
in Excel. I was intrigued by his use of surface charts in his analysis. Theseem 
to give a very good visual feel for  the most effective levels of the 
variables he is using.
I've included Tradestation code from an article he wrote for ActiveTrader 
Magazine - April 2002 - . If any one is familiar with this article and could 
write the afl code that would be great. I think it would be awsome if Thomasz 
could include the capability for us to display our analysis 
using chart formats such as surface charts and and scatter diagrams like he 
uses in the Risk/Yield display in Amibroker.
I owe, I owe, it's off to work I go!
Bye for now,
Greg
Formula for the system 
dicussed in "Balancing stop size and trade length" by Thomas Stridsman (p. 
66):
Inputs: TestRuns(9), 
ExitLevels(0), BarsInTrade(0);Variables: EntryTrigger(0), LongStopLoss(0), 
ShortStopLoss(0), ExitTrigger(0);EntryTrigger = 
IntPortion(Random(2));ExitTrigger = (ExitLevels / 5 + 0.2) / 100;If 
EntryTrigger = 1 and MarketPosition = 0 Then BeginIf High < High[2] and 
Close < Open and Open Next Bar < High Then BeginBuy Next Bar at High 
Stop;LongStopLoss = 1 - ExitTrigger;End;If Low > Low[2] and Close 
> Open and Open Next Bar > Low Then BeginSell Next Bar at Low 
Stop;ShortStopLoss = 1 + ExitTrigger;End;End;If MarketPosition = 
1 ThenExitLong Next Bar at EntryPrice * LongStopLoss Stop;If 
MarketPosition = -1 ThenExitShort Next Bar at EntryPrice * ShortStopLoss 
Stop;If BarsSinceEntry = BarsInTrade+1 Then BeginExitLong Next Bar at 
Market;ExitShort Next Bar at Market;End;
Variables: NoTrades(0), 
MarPos(0), TrProfit(0), SumTrProfit(0), AvgTrade(0), TestString(""), 
FileString("");
NoTrades = 
TotalTrades;MarPos = MarketPosition;If NoTrades > NoTrades[1] Then 
BeginIf MarPos[1] = 1 ThenTrProfit = (ExitPrice(1) - EntryPrice(1)) * 
100 / EntryPrice(1);If MarPos[1] = -1 ThenTrProfit = (EntryPrice(1) - 
ExitPrice(1)) * 100 / EntryPrice(1);SumTrProfit = SumTrProfit + 
TrProfit;End;
If LastCalcDate =Date + 1 
Then BeginAvgTrade = SumTrProfit / NoTrades;TestString = 
LeftStr(GetSymbolName, 5) + "," + NumToStr(TestRuns, 0) + "," + 
NumToStr(ExitTrigger*100, 2) + "," +NumToStr(BarsInTrade+1, 2) + "," + 
NumToStr(AvgTrade, 2) + NewLine;FileString = "D:\Temp\StopTest-" + 
RightStr(NumToStr(CurrentDate, 0), 4) + ".csv";FileAppend(FileString, 
TestString);End;