help-im going mad!

Discussion in 'Strategy Development' started by me99, Jul 19, 2003.

  1. me99

    me99

    hi
    im attempting to code a very simple showme study in tradestation, all im trying to do is find the highest high within a range of data as that data progresses, im assuming that this is incredibly easy or im incredibly stupid-you can decide after youve read the rest of the message,so far i have:

    {if the high is greater than 0 then the high becomes the new myhi, if on the next bar the high is > myhi then that high becomes the new myhi, and so on etc}

    vars: myhi(0);

    if high > myhi then myhi = high;


    plot1 (myhi,"myhi");

    however this gives me the highs of several (seemingly random) bars, i just want the actual highest bar within a range of bars-what am i doing wrong?
    thanks
     
  2. xygeek

    xygeek

    vars: myhi(0), len(20);

    myhi = highest(H,len);

    plot1 (myhi,"myhi");
     
  3. I'm not sure what you are looking for: Is it the high for all data in the chart or the high for a specified lookback period?

    DS