Error in Highest[n](high)

Forums ProRealTime English forum ProBuilder support Error in Highest[n](high)

Viewing 12 posts - 1 through 12 (of 12 total)
  • #5899

    Hi everyone!

    I’m getting this error when trying to set up one variable at Highest.

    If I set up n=1,2,3… etc is working ok.

    Result of “n” calculation is 1,2,3.. but getting this error alert: “Integer positive expected on HIGHEST”

    Any ideas?

     

    #5901

    Because 0-1=-1

    Look at how you calculate your n variable! The first barindex is 0.

    #5902

    Thanks Nicolas, I tryed different ways to calculate “n”.

    Getting the same error in all cases, it says that “n” should be an integer positive.
    Return n is showing 1,2,3… so… is an integer, is positive… I can’t get the point :/

    Cheers!

    #5903

    n variable may return 0 sometimes?

    #5904

    Yes, you are right! but still the same.

    At this point first result is 1 instead 0, but still the same error, here the code updated:

     

     

    #5911

    Just tried to solve this issue. I’m stuck here too 🙂 Sunday evening you know …

    In intraday your n variable still returns negative values though.

    Maybe you could explain me better what you want to do with this code? I would be more helpful!

     

     

     

    #5915

    Thanks Nicolas!

    I wanna set “n” as the result of the current bar minus the first bar (in this case January 1st bar) so, in January 15th the result of (n=currentbar-firstbar) should be “15” and set “n” (Highest[n](high) or Lowest[n](low) as 15.

    The point here is to get the maximum and minimum prices of the current year from variables Highest and Lowest. But.. Maybe there is a short and  easy way to find this, Like Dhigh…. I’m confused also…

    Thanks a lot again for your time Nicolas.

    #5922

    Oh I see now 🙂

    Is this what you are trying to do? :

     

    #5933

    Yes! Thanks so much Nicolas. Going to test it now!

    #5936

    Perfect but… Do we know, why, “n”, is not able no be at “Highest[n]”?

    Or should be an exact number and not a result?

    Fixed with your code but still thinking about it.

     

    Cheers!

    #5938

    Nope, don’t have any idea of what causing this right now.. I’m happy you get what you want though.

    #8713

    Finally I thinkl I know what the problem is, and with your help and working together with RICHARDYUSTE, we realize we were getting “0” as first result, that was the problem. First result is “1” but Barindex was “0” sometime… Seems to be ok now.  🙂

    Best trading ever 🙂

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

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