Problem with BollingerDown > BollingerDonw [1]

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #137516 quote
    Oliviertrader2020
    Participant
    Average

    Hello,

    I’m having a problem with a personal indicator.
    I want an arrow to appear on the chart when the lower Bollinger is higher than the lower Bollinger Band of the previous period (BollingerDown > BollingerDonw [1]).

    For the first part of the code (that of the condition), I used the condtion as it appears when using simplified programming with ProOrder.

    For the second part (the arrow part), I used the method used by @Nicolas in one of his videos on Youtube and that works with my other indicators.
    The problem is that the arrow is present on the graph all the time, even when the current bollinger is lower than the low bollinger band of the previous period.
    Can someone help me?

    
    
    // Conditions for buy
    indicator1 = BollingerDown[20](close)
    indicator2 = BollingerDown[20](close)
    c1 = (indicator1 > indicator2[1])
    
    IF C1 then
    PrixB = low - 5*pipsize
    DRAWARROWUP(barindex[1],low[75])coloured(0,255,0)
    else
    PriceB = 0
    endif
    
    Return
    Lower-Bollinger-Band.png Lower-Bollinger-Band.png
    #137520 quote
    Nicolas
    Keymaster
    Master

    Why are you using the Low from the 75th previous bar to plot the arrows?

    Shouldn’t it be coded like this instead?

    DRAWARROWUP(barindex[1],prixB)coloured(0,255,0)
    #137526 quote
    Oliviertrader2020
    Participant
    Average

    Yes, 75 is a mistake. I was using that level to shift the price arrow to another indicator.
    I used your code by inserting BollingerDown [20] instead of PriceB.
    Thank you for your help Nicolas.

    IF C1 then
    DRAWARROWUP(barindex[1],BollingerDown[20])coloured(0,255,0)
    endif
    
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Problem with BollingerDown > BollingerDonw [1]


ProBuilder: Indicators & Custom Tools

New Reply
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/29/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...