Announcement

Collapse
No announcement yet.

How write in code (-2) bar less then 1%

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How write in code (-2) bar less then 1%

    How do I write in code that my (-2) bar High to Low has to be less then 1 percent
    Here is what I wrote:
    high(-2) - low (-2) < = *.01

  • #2
    sjsr
    If you are trying to determine whether the High of two bars ago is within 1 percent of the Low of two bars ago then you could write the condition as follows
    if((high(-2)-low(-2))/low(-2)<=0.01
    If that is not what you are trying to do then you need to provide further details as to what value the range of two bars ago must be less than 1 percent of.
    Alex


    Originally posted by sjsr
    How do I write in code that my (-2) bar High to Low has to be less then 1 percent
    Here is what I wrote:
    high(-2) - low (-2) < = *.01

    Comment


    • #3
      Here is what i need please

      Here is what i need.
      low of -3bar price $30.00
      high of-1bar price $30.60

      the low to high is 2% it needs to be less then 1% 30 cents

      Comment


      • #4
        Thank you

        I do want to thank you very much for helping me. Your suggestion worked great.
        You are a good person for helping for no cost.
        Thanks again

        Comment

        Working...
        X