Ceiling line not working with minimum

Forums ProRealTime English forum ProBuilder support Ceiling line not working with minimum

Viewing 4 posts - 1 through 4 (of 4 total)
  • #162558
    gfx

    Hi,

    Let’s take an ema and compare current value with its previous value.

    As long as it goes down, slode negative, we draw a ceiling on top of  price with highest high of last 20 bars.

     

    Result in attached file.

    It looks great until the slope turns positive for a few candles, and then negative again, whereas during these few candles the highhest high over the 20 last high has increased.

    The orange line turns blue. But I don’t want the ceiling value to increase.

    So I decide, when the slope is negative, to draw as ceiling the minimum value beetween  the previous ceilling and the highest high.

    When I validate the indicator, no ceiling line is drawn on the chart.

    I don’t undestrand why …

    I tried to initialise with a high value, and/or use a temporary variable to calculate the min …

    Ceiling line still not drawn on chart 🙂

    Any idea why ?

    Thks.

    gfx

    #162570

    gfx – Once again this is an indicator coding question and not a platform issue. That is the second one tonight posted in the wrong place. Please try to understand which forums are for which subjects. I moved your topic….again.

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

    #162571

    Have you tried enclosing your code in:

     

    #162572

    In the first two examples, lines 5 and 6 can be removed.

    Example 1 works fine. Please post instrument, TF, date and time of the candle  where it plots incorrectly.

    If you replace your second example with this one, it’lll work, but due to MIN() the indicator is quite BELOW the current price so you’ll have to shrink the chart slightly (and use 10K units):

    Third example is like the second one:

     

     

     

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

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