ThinkScript Question

Discussion in 'Trading Software' started by RyGuy, Nov 17, 2015.

  1. RyGuy

    RyGuy

    I'm new to TOS, here's what I'm trying to do:

    1) Determine the Amihud liquidity measure for any given stock - the average of: past stock return(days -35 to -5, 0 being the current day) divided by volume over those same days.
    2)Measure volatility of any given stock - standard deviation of the abnormal daily returns from previous days(Again, -35 to -5).

    It has to be so specific because the model I made is based on data I didn't collect, which was measured in this way.

    For the aggregation period I see a function for MONTH and FOURDAYS - I
    suppose I could subtract those from each other and get close: -30 to -4, but I was hoping to be more accurate.

    Is there a way to do this? Thanks!