can ts optimize the best timeframe

Discussion in 'Trading Software' started by robinxing, Mar 19, 2007.

  1. ts can opitmize parameter with a fixed time frame

    for example 1 min or 5min

    if the parameter is fixed

    can I optimize the best time frame?
     
  2. or any TS add-on can do the job?
     
  3. TraDaToR

    TraDaToR

    I don't think so.

    There is a function BarInterval, but I don't think you can put it as input and optimize it.

    Here it is:

    BarInterval (Reserved Word)
    Disclaimer

    Reserved word that returns the bar interval for the type of data that an analysis technique is applied to.

    Remarks
    BarInterval is only valid when used on intraday, volume, and tick data. Returns minutes for intraday time-based bars, shares/contracts for volume-based bars, or tick count for tick-based bars.

    Examples
    Condition1 = (BarInterval = 5)

    is a statement that will cause Condition1 to be true if the analysis technique is applied to a 5-minute intraday chart..

    CalcTime(Sess1StartTime, BarInterval)

    will add the bar interval to the start time of the asset in an intraday time-based chart.

    Additional Example
    CalcTime(Sess1EndTime, -BarInterval) returns the time of the last bar before the close of the trading session for an intraday time-based chart.

    I'm not sure. You may try it.
     
  4. no

    I have tried

    barinterval can not be optimized
     
  5. The answer is YES. But it is a little more involved than you may want to go.
     
  6. Pro_Trader720


    how to do the job?

    would you mind telling me more ?
     
  7. TraDaToR

    TraDaToR

  8. Sorry I must have missed this.

    If you run a 1 minute chart in TradeStation, then you can simulate your own bars and store them in an array for calculations. Somewhere in the algorithm that is simulating bars you have an input for bar interval. The code will run annoyingly slow!
     
  9. TraDaToR

    TraDaToR

    me too. But I didn't even know it was possible to optimize time frame.
     
    #10     Mar 20, 2007