he rules of the 3-day high/low method/strategy

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #215376 quote
    Aragorna
    Participant
    Junior

    Hi, can someone help me to create this famous Larry Conjnor strategy? thank’s in advance
    The rules of the 3-day high/low method/strategy
    the strategy is like this:

    1. Today’s close must be higher than the 200-day moving average.
    2. Today’s close must be lower than the 5-day moving average.
    3. Two days ago both the high and low were lower than the day before.
    4. Yesterday the high and low were lower than the day before.
    5. Today the high and low are lower than yesterday.
    6. If conditions 1-5 are true, then buy today at the close.
    7. Exit at the close when the close is above the 5-day moving average.
    #215441 quote
    JS
    Participant
    Senior

    Hi,

    Hereby the Larry Conner strategy “3 Day High Low”…

    Report figures are nice except for the DrawDown…

    You can’t buy or sell on the “Close”, it is always on the “Open” of the next bar…

    DefParam CumulateOrders=False
    TimeFrame(1 Day, UpdateOnClose)
    C1=Close>Average[200](Close)
    C2=Close<Average[5](Close)
    C3A=High[2]<High[3]
    C3B=Low[2]<Low[3]
    C4A=High[1]<High[2]
    C4B=Low[1]<Low[2]
    C5A=High<High[1]
    C5B=Low<Low[1]
    If C1 and C2 and C3A and C3B and C4A and C4B and C5A and C5B then
    Buy 1 contract at Market
    EndIf
    If Close>Average[5](Close) then
    Sell at Market
    EndIf
    Scherm­afbeelding-2023-05-30-om-15.27.34.png Scherm­afbeelding-2023-05-30-om-15.27.34.png
    #215458 quote
    Aragorna
    Participant
    Junior
    thank’s JS. MAybe is it possible to buy at close, for example at 21.30 last half an hour? so, strategy works in 30 min timeframe and to use Dhigh and Dlow in strategy?
    #217585 quote
    ProRealAlgos
    Participant
    Junior
    The Larry Connor 3-day high/low method/strategy for DAX. I added a stoploss of 1.4% and code to exit trade if the low of today is bigger than the low of yesterday if the high of today is lower than the high of yesterday. I also added another entry condition to only enter the trade if low of today is smaller than yesterday XOR the high of today is lower than the high of yesterday. Runs on the daily timeframe on DAX40. Backtest for 200k units attached,
    DefParam CumulateOrders=False
    TimeFrame(1 Day, UpdateOnClose)
    C1=Close>Average[200](Close)
    C2=Close<Average[5](Close)
    C3A=High[2]<High[3]
    C3B=Low[2]<Low[3]
    C4A=High[1]<High[2]
    C4B=Low[1]<Low[2]
    C5A=High<High[1]
    C5B=Low<Low[1]
    
    If C1 and C2 and C3A and C3B and C4A and C4B and C5A and C5B then
    Buy 1 contract at Market
    SET STOP %LOSS 1.4
    EndIf
    
    If Close>Average[5](Close) and (dlow(0) < dlow(1) xor dhigh(0) < dhigh(1)) then
    Sell at Market
    EndIf
    
    if dlow(0) > dlow(1) and dhigh(0) < dhigh(1) then
    sell at market
    endif
    ddax.png ddax.png
    #217603 quote
    Razz
    Participant
    Master
    Hello when I want to insert the code I get a lot of errors? What is the cause?
    Fehler-Code.png Fehler-Code.png
    #217605 quote
    PeterSt
    Participant
    Master
    It looks like you are programming this in an Indicator, while the commands you use (from ProRealAlgos) are meant to be for a Backtesting & Autotrading system (see mouse arrow below).
    Razz thanked this post
    image_2023-07-13_162859662.png image_2023-07-13_162859662.png
    #217609 quote
    robertogozzi
    Moderator
    Master
    As from the attached pic, lick the COPY icon to automatically select the code, then press Ctrl+C to copy the text into the clipboard to later paste it in the platform or a text file of your choice.
    x-7.jpg x-7.jpg
    #217618 quote
    Razz
    Participant
    Master
    Hello PeterST Thanks for your help I accidentally wanted to actually create it as an indicator, how stupid of me.
    #217671 quote
    ProRealAlgos
    Participant
    Junior
    One of our customers just contacted us, apparently this strategy works quite good on DAX on the 1-minute timeframe with only some minor adjustments. Add these two extra parameters for the code, remove the timeframe-row and you will get a backtest looking like the attached images.
    noEntryBeforeTime = 080000
    noEntryAfterTime = 171500
    8ee5fc_c95dcad32ff1434482fb105f4b96d310mv2.jpg 8ee5fc_c95dcad32ff1434482fb105f4b96d310mv2.jpg 8ee5fc_e3fe9d799ed843aaabfbfddc827f661bmv2.jpg 8ee5fc_e3fe9d799ed843aaabfbfddc827f661bmv2.jpg 8ee5fc_4f4d77725dc8491a8a3b386fa62639f7mv2.png 8ee5fc_4f4d77725dc8491a8a3b386fa62639f7mv2.png
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

he rules of the 3-day high/low method/strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Aragorna @aragorna Participant
Summary

This topic contains 8 replies,
has 6 voices, and was last updated by ProRealAlgos
2 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/29/2023
Status: Active
Attachments: 8 files
Logo Logo
Loading...