Higher Lows Price and MACD in sync when candle crosses MA

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #107045 quote
    Malend
    Participant
    Average

    With  help from Vonasi (many many thanks) I developed an indicator which shows higher lows and lower highs in the MACD in sync with higher lows from bars which cross the Averge line. You are able set your personal Average and personal MACD.
    In the image you see an example of lower highs in sync.

    DEFPARAM calculateonlastbars = 1000
    
    macdl = macdline[ShortTermMA,LongTermMA,Periods]
    macds = exponentialaverage[Periods](macdl)
    
     
    //start of cycle low
    If macdl =< macds and macdl[1] > macds[1] then
    macdlowest2 = macdlowest
    lowestprice2 = lowestprice
    incyclelow = 1
    macdlowest = macdl
    LowestPrice = low
    endif
     
    //End of cycle low
    If macdl > macds and macdl[1] < macds[1] or macdl < macdlowest2 then
    incyclelow = 0
    endif
     
    //lowest macd and price in cycle
    if incyclelow then
    macdlowest = min(macdlowest, macdl)
    lowestPrice = min(lowestprice, low)
    c1 = open < average[ma]
    c2 = close > average[ma]
    c3 = macdlowest > macdlowest2
    c4 = lowestprice > lowestprice2
     
    if c1 and c2 and c3 and c4 then
    drawvline(barindex)coloured(0,250,0)
    
    endif
    
    endif
    //start of cycle high
    If macdl => macds and macdl[1] < macds[1] then
    macdhighest2 = macdhighest
    highestprice2 = highestprice
    incyclehigh = 1
    macdhighest = macdl
    highestPrice = high
    endif
     
    //End of cycle high
    If macdl < macds and macdl[1] > macds[1] or macdl > macdhighest2 then
    incyclehigh = 0
    endif
     
    //highest macd and price in cycle high
    if incyclehigh then
    macdhighest = min(macdhighest, macdl)
    highestPrice = min(highestprice, low)
    c1a = open > average[ma]
    c2a = close < average[ma]
    c3a = macdhighest < macdhighest2
    c4a = highestprice < highestprice2
    if c1a and c2a and c3a and c4a then
    drawvline(barindex)coloured(250,0,0)
    endif
    endif
    return
    
    HL-LH-MACD-Price-1.jpg HL-LH-MACD-Price-1.jpg
    #107055 quote
    Vonasi
    Moderator
    Master

    An image of the actual indicator on a chart might be helpful.

    #107056 quote
    Malend
    Participant
    Average

    I found one error, so here the fresh one.

    DEFPARAM calculateonlastbars = 1000
     
    macdl = macdline[ShortTermMA,LongTermMA,Periods]
    macds = exponentialaverage[Periods](macdl)
     
     
    //start of cycle low
    If macdl =< macds and macdl[1] > macds[1] then
    macdlowest2 = macdlowest
    lowestprice2 = lowestprice
    incyclelow = 1
    macdlowest = macdl
    LowestPrice = low
    endif
     
    //End of cycle low
    If macdl > macds and macdl[1] < macds[1] or macdl < macdlowest2 then
    incyclelow = 0
    endif
     
    //lowest macd and price in cycle
    if incyclelow then
    macdlowest = min(macdlowest, macdl)
    lowestPrice = min(lowestprice, low)
    c1 = open < average[ma]
    c2 = close > average[ma]
    c3 = macdlowest > macdlowest2
    c4 = lowestprice > lowestprice2
     
    if c1 and c2 and c3 and c4 then
    drawvline(barindex)coloured(0,250,0)
     
    endif
     
    endif
    //start of cycle high
    If macdl => macds and macdl[1] < macds[1] then
    macdhighest2 = macdhighest
    highestprice2 = highestprice
    incyclehigh = 1
    macdhighest = macdl
    highestPrice = high
    endif
     
    //End of cycle high
    If macdl < macds and macdl[1] > macds[1] or macdl > macdhighest2 then
    incyclehigh = 0
    endif
     
    //highest macd and price in cycle high
    if incyclehigh then
    macdhighest = max(macdhighest, macdl)
    highestPrice = max(highestprice, high)
    c1a = open > average[ma]
    c2a = close < average[ma]
    c3a = macdhighest < macdhighest2
    c4a = highestprice < highestprice2
    if c1a and c2a and c3a and c4a then
    drawvline(barindex)coloured(250,0,0)
    endif
    endif
    #107058 quote
    Nicolas
    Keymaster
    Master

    How do you use it please? People would love to know! (and me too) 😉

    #107061 quote
    Malend
    Participant
    Average

    Hi Nicolas,

    It could be a way enter positions. Of course it is an indicator which only indicates, but it in a trending market it could be a way to enter positions. As you see in example in the image it indicates a possibility to go long.

    #107062 quote
    Malend
    Participant
    Average

    If you need higher probability you it would be good to combine it with your favourite indicators.

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

Higher Lows Price and MACD in sync when candle crosses MA


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Malend @malend Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/10/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...