Trade station Code

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

  1. Bwahahahaha

    Use Sess1StartTime... so you open the PowerEditor each time you put that in a new data set...

    C'mon...

    Make sure you plot the indicator as points rather than a line so that each new high or low is not connected together.
     
    #11     Sep 1, 2003
  2. WarEagle

    WarEagle Moderator

    No need to be a jerk Gann. We are all just working to get better. Use your powers for good rather than evil.
     
    #12     Sep 1, 2003
  3. Were highd and lowd part of the 2000i package? I don't remember. I do know that they both utilize another "multiple output wrapper function" that creates and stores an array containing the OHLC for a specified period.

    The Minutes since Open approach described above is also inefficient, computationally and otherwise.

    7.1 comes with simpler IDHIGH and IDLOW functions, as well as indicators that draw, extend, and re-draw horizontal lines at current HOD and LOD (and other levels, if desired).

    If you do use whatever functions, take a look at how they're written and you'll figure some things out that you might find useful for other code.

    For most instruments, the key is marking the first bar of the day - usually you can get by with IF DATE <> DATE[1], which is flexible across time zones and instruments- though, if you use pre-market or night session data on whatever chart, then you might not get what you want. For those charts or instruments you might want to use Sess1StartTime or other specific start times.

    Once you've identified the beginning point, the functions will follow a simple format somewhat along the lines of the following - as always there are diverse approaches:

    vars: HOD(0),LOD(0);

    If DATE > DATE[1] then begin
    HOD = H;
    LOD = L;
    END;

    If H > HOD then HOD = H;
    If L < LOD then LOD = L;

    PLOT1(HOD,"HOD");
    PLOT2(LOD,"LOD");

    It's a simple concept that can easily be adapted for finding the highs and lows (or other values) for whatever designated periods - such as the first half hour, first hour, last hour, etc.
     
    #13     Sep 1, 2003