“double seven” by Conners and Alvarez

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #165752 quote
    f1_maik
    Participant
    Junior

    Double Seven
    A system by Larry Connors and Cesar Alvarez

    The “Double Seven” strategy was described in 2008 in the book “Short Term Trading Strategies that Work”.

    The name “double seven” is also almost the whole description of the strategy:
    Go long when today’s close is lower than the lowest low of the last seven days. Sell the long position again if today’s close is greater than the highest high of the last seven days. A moving average over 200 daily periods serves as a trend filter.

    The prorealtimecode for double seven would be this?

     

    // double seven
    // buy larry conners and cesar alvarez
    // timeframe daily
    
    
    If close < lowest [7] (low) then
    If close > average [200] (close)  then
    buy at market
    Endif
    Endif
    
    If close > highest [7] (high) then
    sell at market
    Endif
    
    

     

    kind

    maik

    #165759 quote
    Vonasi
    Moderator
    Master

    Your code is not quite correct as it includes the current days low in the condition test and it is impossible for today’s close to be less than today’s low – and the same for the highest test.

    Change the code to this:

    defparam cumulateorders = false
    // double seven
    // buy larry conners and cesar alvarez
    // timeframe daily
    
    If close < lowest [7] (low[1]) then
    If close > average [200] (close)  then
    buy at market
    Endif
    Endif
    
    If close > highest [7] (high[1]) then
    sell at market
    Endif
    #165760 quote
    robertogozzi
    Moderator
    Master

    Or it could reference CLOSE, instead of HIGH & LOW:

    // double seven
    // buy larry conners and cesar alvarez
    // timeframe daily
    
    If close = lowest[7](close) then
       If close > average[200](close) then
          buy at market
       Endif
    Endif
    
    If close = highest[7](close) then
       sell at market
    Endif
    f1_maik thanked this post
    #165761 quote
    Vonasi
    Moderator
    Master

    It is not a very good strategy as if the market keeps falling and fails to make new seven day highs then you will hold into a massive market drop and have massive draw down.

    Image shows the strategy compared to buy and hold on DJI with no spread:

    Screenshot_2-2.png Screenshot_2-2.png
    #165764 quote
    f1_maik
    Participant
    Junior

    You have helped me.

    Thanks very much.

    #165964 quote
    f1_maik
    Participant
    Junior

    Can this be coded as a 7-line break in imitation of a 3-line break? What would that look like?

    #165969 quote
    robertogozzi
    Moderator
    Master

    3 Line Break, Kagi, Renko, Ticks and all other non-time based charts cannot be used for automated trading.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

“double seven” by Conners and Alvarez


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
f1_maik @f1_maik Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by robertogozzi
4 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/30/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...