[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time to Tick



PureBytes Links

Trading Reference Links

At 11:18 AM 7/17/2005, Jonathan wrote:

>I am trying to have an indicator that is based on a 1 minute chart, reflected over to a tick chart that I use for trading.  In other words I would like the time chart based indicator to be plotted onto a tick chart.
>
>Is there a clever way to do this?  (I'm using TS 8.1)


If the calculations in the chart are your code or use "simple" (not "series") functions you can put your code inside a conditional statement:

  if Time <> Time[1] then begin

     < your code here >

  end;

The code inside will execute on the first tick bar of a new minute bar. If you are using, say, 10-tick or 100-tick bars, this may occur well into the next minute. This method will be exact only when using 1-tick bars.

Using 1-tick bars, the close of the 1-minute bar is the close of the previous tick bar so you would need to use Close[1] instead of Close to get the value.

If you need the high, low, open of the "synthetic" 1-minute bar, you will have to calculate then.

If your code uses "series" functions, they will execute on every bar anyway so this will not work unless you rewrite the functions to be "simple" functions.

Bob Fulks