Help with Higher Lows Price sync with Higher Low MACD when candle crosses MA

Forums ProRealTime English forum ProBuilder support Help with Higher Lows Price sync with Higher Low MACD when candle crosses MA

Viewing 15 posts - 1 through 15 (of 73 total)
  • #106711

    Hello all,
    What I want to see is this:

    A Cycle Low is the period when the MACD < Signal line. It starts when the MACD crosses under the Signal  line and ends when the MACD crosses over the Signal line. The MACD Cycle Lowest is the Lowest MACD during that Cycle Low, measured after the Cycle has finished,
    I want a Signal when:
    – a bullish candle crosses over the bullish SMA50at the close of the candle and
    – the MACD at that > previous MACD Cycle Lowest and
    – the MACD at that moment =< Signal line and
    – the price low at that moment > price low at the previous MACD Cycle Lowest.

    Where I fail is how to describe the period of the cycle low from the MACD, the start and the end and how to define the lowest MACD and the the lowes price in that MACD-period.
    I only have the long version here to keep it readable. When it works I will complete it with the short version included.

    Thanks a lot,
    Marc

     

     

    #106712

    I see that after
    // Signal Long
    I wrote CCA, which needs to be CCL, but that isn’t the help I am looking for. 🙂

    #106779

    Here a Printscreen of what I am looking for.

    #106786

    I find your use of variable names very challenging! Not sure I am 100% on top of your code but perhaps you mean something like this?

    Not tested.

    #106832

    Hi Vonasi,
    Thanks a lot for your response. I am still looking for a better  and clearer way of naming the parameters. I can imagine it is challenging, sorry for that.
    I have added your lines ( see attachment), but I get a syntax error in your line 9 ( I know I coded that one :-). So something isn’t right in that line.

    How can I copy and paste the coding including the line numbers on the left?  When I copy and paste it doesn’t iclude the lines.

    #106833

    ‘Signalline’ is not defined in your code.

    There are two MACD instructions in PRT.

    MACD is the histogram value.

    MACDLINE is the line value.

    To get a signal line value take an exponential average of the MACDLINE.

    #106834

    How can I copy and paste the coding including the line numbers on the left?  When I copy and paste it doesn’t iclude the lines.

    You can’t.

    #106837

    I simplified the whole thing. I hope these variables are  better readable. I stille get a syntax error at line 19.
    And… I see the line numbers in the left show up after I submitted.

     

     

    #106838

    This is just defining the MACD period with the Higher Lows.
    I need to add the crossing with the SMA.
    I will add that in a minute.
    Thanks a lot Vonasi for helping me out and challenging me to reconsider my way of programming

     

    #106842

    I stille get a syntax error at line 19.

    Haven’t you missed an If at the beginning of Line 19 or is it a copy and paste error?

    #106848

    Thanks GraHal,
    Too many hours behand the screen :-).
    I will come back on the Backtest as we spoke about in the other Forum after I have doen this, so I can combine both.
    Cheers, Marc

    #106853

    Change line 6 to:

     

     

    #106855

    This does not do what you are trying to do. With mcl = 1 it just tells you what the lowest low of the current bar is – which is always going to be the low! Same for the signal line. If the next low is higher then it will just change to that value.

    You need to go back to how I showed you and use the MIN instruction to store the lowest value while a flag to say you are in your low cycle is set.

    #106864

    I have now the MACD Cycle Low and MACD Cycle High and the crossings from the close over and under the SMA. I don’t get a Syntax Error anymore, but I also don’t get any Signal in my chart.
    AND…. I really appreciate all your help as I started from scratch with coding a few weeks ago.

     

    #106871
Viewing 15 posts - 1 through 15 (of 73 total)

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