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?
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.
Hello again, I was on TS forums and I saw a thread that may interest you. I haven't tried but it seems that the code is working: https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=62235 bye
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!