Trade station Code

Discussion in 'Trading Software' started by Shallow, Aug 31, 2003.

  1. Shallow

    Shallow

    Any body out there has the code for plotting intra day High and low automatically on TS 2000i..

    thx
     
  2. In my opinion, Tradestation stinks as a charting package......Ensign has this tool and so may others built in.
     
  3. Plot1(High, "High");

    Plot1(Low, "Low");
     
  4. TGregg

    TGregg

    That'll merely give you the high of the current bar. It's fairly easy to do though - take into account the time frame of the chart, and the current time. Then get the highest high and the lowest low since open using the lowest and highest functions.
     
  5. Shallow

    Shallow

    but this plots the high and low of each bar.. and not the high and the low of the day ..

    thx
     
  6. WarEagle

    WarEagle Moderator

    This will plot the intraday high and low of the current day on a 1 minute chart. Just change 0830 to whatever time zone you are in for the open. If you use a longer interval than 1 minute, divide MinSinceOpen by the appropriate interval in the plot statement (Ex. Plot1(Highest(High, MinSinceOpen/5), "High"); for a 5 minute chart, etc.)

    {Start code}
    Vars: MinSinceOpen(0), StartMin(0);

    If Time = 0830 then StartMin = TimeToMinutes(0830);
    MinSinceOpen = TimeToMinutes(Time) - StartMin;

    Plot1(Highest(High, MinSinceOpen), "High");

    Plot2(Lowest(Low, MinSinceOpen), "Low");
    {End code}

    Make sure you plot the indicator as points rather than a line so that each new high or low is not connected together.
     
  7. highd(0)
    lowd(0)

    plot them
     
  8. WarEagle

    WarEagle Moderator

    Sure, you can take the easy way out if you want....LOL

    Thanks for the tip...not sure why I have to make things so hard sometimes.
     
  9. Always there to keep me straight Greg. :D
     
  10. Brahahaha...

    Plot1... Plot1...

    and it only plots the High and Low of the bar...

    Rather use:

    Plot1(HighD(0), "High of Day");
    Plot2(LowD(0), "Low of Day");

    LOL
     
    #10     Sep 1, 2003