Trading Strategy – Buy at Market on nth occurrence of Lower Low

Forums ProRealTime English forum ProOrder support Trading Strategy – Buy at Market on nth occurrence of Lower Low

Viewing 7 posts - 1 through 7 (of 7 total)
  • #177199

    Hi Nicolas

    I would appreciate some guidance on coding a strategy that will buy at market on the nth occurrence of a Lower Low (LL). See picture attached for my expectaton of a Lower Low.

    In english i’m looking for somthing like this:

    Lower Low can be a variation of “low[5] > low[4] and low[4] >= low[3] and low[3] >= low[2] and low[2] < low[1] and low[1] < low[0]”

    Start with setting the variables LL1 to LL5  to 0

    Next

    1st occurence of a LL set LL1 = Price of Low[2] within the Lower Low

    In between each lower lower there will be a Lower High (which could be the opposite of the description of the Lower Lower above).

    2nd occurence of LL set LL2 = Price of  Low[2] within the 2nd Lower Low

    3rd occurence of LL set variable LL3 = Price of  Low[2] within the 3rd Lower Low

    Then buy when LL3 is <> 0

    Then when on market set LL variables back to 0 and start again.

    Thanks for our support in advance.

    Steve

    #177221

    Hello,
    The signal is clearly in the style of Williams’ fractals.
    To keep track of previous signals, I believe you can play with intermediate variables, and a table to log LL values. Something like this (not tested):
    Remark: not sure why there is a need for 5 variables and why LL3 should be initialized if it is set to 0 just after

    PS: when do you plan to sell?

    #177237

    Thanks for the quick response!

    I’ll see if i can incorporate this into my strategy! I’m still playing around with a trailing stop strategy for Selling.

    #177238

    It doesn’t like this, do i need to declare this as an array somehow prior to storing the values?

    LL[LLcount]=low[2]

    #177375

    Hello,
    Never used arrays before, but looking at one fresh post from @Nicolas, there is a need of $ sign
    $LL[LLcount]=low[2]
    To be tested

    #177378

    Indeed, you have to put a $ before a variable name to be considered as an array.

    #177623

    You getting anywhere with this s_darbey  ?

    I am watching with interest as I would love to see code that stores HH / HL and which flags up a change to LH / LL (and vice versa).

     

Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login