Seer logo - advanced backtesting for stock, futures and forex trading systems using using technical analysis indicators, charts, money management and position sizing
SID NameDescriptionRatingUpdated
153 DonchianBreakouTest 4Not Approved2008-07-18

Notes for this Trading Account:

This system is based upon the 4 week rule by Richard Donchian. In the original system, the system was always long or short, this system will trade flat when none trending.

Rules:
Enter long when the close exceeds the high of the previous 20 bars
Exit long when the close falls below the low of the previous 10 bars
Enter short when close falls below the low of the previous 20 bars
Exit short when the close exceeds the high of the previous 10 bars


Rules for this Trading Account:

Notes for this Trading System:

Rules for this Trading System:

Bar event logic:

#This system is based upon the 4 week rule by Richard Donchian
#In the original system, the system was always long or short, this 
#system will trade flat when none trending.

#Rules: 
#Enter long when the close exceeds the high of the previous 20 bars
#Exit long when the close falls below the low of the previous 10 bars
#Enter short when close falls below the low of the previous 20 bars
#Exit short when the close exceeds the high of the previous 10 bars

unless (Position) {
  #we have no position, perform entry logic
  BuyOpen if ClosePrice>Yesterday(Highest(High,20));
  SellOpen if ClosePrice<Yesterday(Lowest(Low,20));
}
else {
  #We have a position
  if (LongPosition) {
    #We have a long Position, perform exit logic
    SellOpen if ClosePrice<Yesterday(Lowest(Low,10));
  }
  else {
    #We have a short Position, perform exit logic
    BuyOpen if ClosePrice>Yesterday(Highest(High,10));
  }
}

© 2008 seer trading systems ltd
feedback FAQ legal privacy