TS Programming- Time

Discussion in 'Strategy Development' started by FinStat, May 28, 2003.

  1. FinStat

    FinStat

    Looking for some help programming certain criteria as a function of time (i.e., high between 10am and 11am, low between 9:30am and 10:30am).

    Any help would be appreciated.
     
  2. Function: Hi1011

    input: starttime(1000), endtime(1100);
    var: HH(0);

    if date>date[1] then hh = 0;

    if time>=starttime and time<=endtime then begin
    hh = maxlist(hh,h);
    Hi1011 = hh;
    end;

    Should work.

    DS
     
  3. FinStat

    FinStat

    thanks for the code.

    receiving error message for input...(1000)

    suggestions???
     
  4. MichaelD

    MichaelD TradeStation Securities


    Dear FinStat,

    Another venue to receive such help would be <www.TradeStationWorld.com>.
    Let me know if there's anything else I could help you with.
     
  5. Fin,

    Sorry, the input should read:

    input: starttime(numericsimple), endtime(numericsimple);

    You'll then need to create an indicator to plot this or you may use it in a strategy.

    DS
     
  6. FinStat

    FinStat

    thanks DS

    much appreciated
     
  7. I notice almost everywhere that there is a high between one time and another. Similarly, I notice there is also a low.

    I have a quote screen too and it is showing a high and a low for everything on the list too.
     
  8. finstat, on the surface, it looks as though your error may be coming from the last line (Hi1011 = hh;) not the input, try to write: Hi10:11 = hh; instead