Cant find the bug with my candlesticks indicator

Forums ProRealTime English forum ProBuilder support Cant find the bug with my candlesticks indicator

Viewing 15 posts - 1 through 15 (of 16 total)
  • #44842

    Hi, i have got this indicator to detect and put a dot under every candle that has a body which is 50% or lower than the whole range. Problem is that it is in consequent, some candles it misses and some candles are not 50% or less that get a dot. Robertogozzi which wrote the code cant find the bug either. I would really be thankful if someone could help me solve this. Best!

     

    #44845

    I think the problem could be that the conditions you are testing for are “on-going”; only when the bar closes you can know for sure if that bar needs a dot

    #44848

    Line 15… would get rid of the “/2” to make it “IF Body <= Shadows THEN”, so that you get a 50% frontier of body vs range

    2 users thanked author for this post.
    #44850

    Really thank you! It helped me. Just wondering if you know a easy way to get those dots in the middle of every candle instead of below? Just if you knew a easy way to do that i would love you! 🙂

    #44854

    Line 16, I’d try replacing it with Dotval= (high+low)/2 in case you want middle of whole candle. Or if you prefer middle of body only rather than whole candle then you could also try with Dotval= (open+close)/2

    #44861

    Ok thanks! But somehow the indicator doesnt work, see image. Some candles which is obvious dont get the dot. I thought the problem was solved first. =/

    #44863

    Is this attachment on a weekly timeframe by any chance? There’s a platform bug for graphical instructions in weekly (and x weeks) timeframes only, that display any text or arrow one candle too early… All other timeframes are without this bug.

    So even if you didn’t say what timeframe this graph is, all dots look furiously in the wrong place to me, but at the right height if shifting all of them to the right by one candle, which is a strong match for the weekly graphical bug. So am I guessing right, your graph here is weekly but other smaller timeframes are ok?

     

    #44869

    No its not only weeks. the attached is daily. =/

    #44874

    last attachment in daily seems ok, dots on candles where they should be at first glance, what’s wrong with it?

     

    #44893

    there is a few which is missing dots.

    #44895

    I tried it on DAX & EURUSD, daily charts, and it seems to be working fine!

    I did not take the the time to check each candle and do the math, but could not find any odd result.

    #44898

    yes it looks good on yours! hmm strange.. what is wrong with mine then…

    #44899

    What instrument is in your screenshot?

    #44918

    gold

    #44931

    It works perfectly on GOLD daily chart, as from the attached screenshot. I highlighted the same candles you circled.

    Here is the code, in case mine and yours mismatch, aside from where you want a dot plotted:

     

    If it’s the same…. maybe a graphical issue, the numer of pixels…. I really couldn’t tell!

    2 users thanked author for this post.
Viewing 15 posts - 1 through 15 (of 16 total)

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