combined mean strategies

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #211988 quote
    ullle73
    Participant
    Senior

    I saw a really interesting video on youtube on combining 5 different mean reversal strategies. Its a long only strategy. They had some great results from 1993-Today. Cpompounding close to 15% a year. They all have the same exit but different entries. Hopefully Roberto comes in and saves the day like so many times before 😀

    Entry strategy 1:

    [1]  calaculate HIGH minus LOW over the last 25 days

    [2] calculate a band 2.5 times LOWER than the HIGH over the last 10 days by using the average from point [1] above

    [3] use the IBS indicator, (IBS =  (Close Low) / (High Low) *100

    [4] If X closes under the band from [2] and IBS indicator has a lower value than 0.3, go long at close (or two minutes before close)

     

    Entry strategy 2:

    [1]  Today is Monday, todays close must be lower than Fridays close

    [2] Fridays close was lower then close from Thursday

    Entry strategy 3:

    [1] We buy when the close is lower than the low of previous 5 trading days

    Entry strategy 4:

    [1] If today has the lowest range (High minus Low) of the previous last 6 trading days, then we go long at the close (or two min before)

    [2] The close must be above the 200-day SMA

    Entry strategy 5:

    [1] Todays high must be higher than the previous high of the last 10 days

    [2] Todays IBS-indicator must be below 0.15

     

    EXIT:

    • Exit when the close is higher than yesterdays high
    #212097 quote
    robertogozzi
    Moderator
    Legend

    There you go:

    DEFPARAM CumulateOrders = false
    timeframe(Daily,UpdateOnClose)
    // Entry strategy 1
    IBS     =  (Close - Low) / (High - Low)// * 100
    HH      = highest[25](high)
    LL      = lowest[25](low)
    HLrange = HH - LL
    Band    = HH - average[10](HLrange)
    c1      = close < Band
    c2      = (IBS < 0.3)
    IF Not OnMarket AND c1 AND c2 THEN
       BUY 1 Contract AT Market
    ENDIF
    // Entry strategy 2
    IF OpenDayOfWeek = 5 THEN
       FRIclose = close
       c3       = close < close[1]
       c4       = 0
    ENDIF
    IF OpenDayOfWeek = 1 THEN
       MONclose = close
       c4       = MONclose < FRIclose
    ENDIF
    IF Not OnMarket AND c3 AND c4 THEN
       BUY 1 Contract AT Market
    ENDIF
    // Entry strategy 3
    c5 = close < lowest[5](low)
    IF Not OnMarket AND c5 THEN
       BUY 1 Contract AT Market
    ENDIF
    // Entry strategy 4
    Sma200 = average[200,0](close)
    c6     = range = lowest[6](range)
    c7     = close > Sma200
    IF Not OnMarket AND c6 AND c7 THEN
       BUY 1 Contract AT Market
    ENDIF
    // Entry strategy 5
    c8     = high > highest[10](high[1])
    c9     = (IBS < 0.15)
    IF Not OnMarket AND c6 AND c7 THEN
       BUY 1 Contract AT Market
    ENDIF
    // EXIT
    IF OnMarket AND close > high[1] THEN
       SELL AT Market
    ENDIF
    GraHal and ullle73 thanked this post
    #212168 quote
    ullle73
    Participant
    Senior

    thanks alot roberto!!

    robertogozzi thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

combined mean strategies


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ullle73 @jonas_rydqvist Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by ullle73
3 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/23/2023
Status: Active
Attachments: No files
Logo Logo
Loading...