Math problems

Discussion in 'Trading' started by pyro, Jun 8, 2003.

  1. pyro



    I need help with math

    if I want to know the midprice of a range I do this:

    {50% range}
    (High + Low) *0.50

    or a 75%

    {75% range}
    (High- (High-Low)*0.75)

    Now, if I want do know the percentage between High and Close I do this:


    My problem is the result that this formula give me.
    Let's see with the S&P friday data.

    That 0.20 indicates a 2% range but if we look tho the previous formulas the 0.50 and 0.75 indicates a 50% and a 75% respectively. So, that 0.20 could be read like 20% and not 2%, correct?

    Can anybody help me with this problem? I'm going nuts with this

    Thank you
  2. TGregg


    Midpoint of the day:

    (high-low)*.5 + low

    I'm not sure what you mean by 75% range, so I cannot give you a forumla for it.

    Percentage between high and close would be either:

    (high-close)/close (percent difference compared to close)
    (high-close)/high (percent difference compared to high)
  3. I'm not exactly sure what you are asking, but try:


    1008/988 = 1.0202429149797570850202429149798

    1.0202 - 1 = 0.0202

    0.0202 * 100 = 2.02%

    The high was 2.02% higher than the close.
  4. 1008-988/988 = 0.0202

    Is that what you want ? That's the % difference between those two numbers.
    If you want the midpoint:

    1008+988 / 2 = 998

    If you want the 3rd quartile:

    988 + (1008-988 * 0.75) = 1003

    I have no idea if that's what you want, but here si what i think is what you want.
  5. Or (if that one is still not complicated enough for you) you could use

    (-high-low)*.5 + low + high

    I personally prefer

    (exp(2*i*pi)*high+ln(e)*low) / sqrt(4) * abs(sin(1.5*pi))
  6. pyro


    Thank you all for the precious help

    Thank you
  7. gotta love that last one :) Classic.