Posted this on Metastock forum but just in case:
What I want do do is get a figure for the cumulative volume between a high that would have occurred up to 1250 periods ago and a low that would have occurred no more than 250 days ago.
This is what would work
((Sum(V,HHV(HIGH,1250))) - (Sum(V,LLV(LOW,250))))
were it not for the fact that this gives the error message "this variable or expression must contain only constant data"
This returns a value and would be OK
((Sum(V,1250)) - (Sum(V,250)))
but for the fact that I don't know where the high/low will be for each stock and do not want to input it manually as I want this for an exploration.
SO: is there a workaround for the fact that the Sum function will only handle a constant, or is there a completely dfferent way of returning the cumulative volume between a high that would have been no more than 1250 bars ago and a low that would have been no more than 20 periods ago in such a way that it can be used for an exploration?
Thanks in advance for any help
What I want do do is get a figure for the cumulative volume between a high that would have occurred up to 1250 periods ago and a low that would have occurred no more than 250 days ago.
This is what would work
((Sum(V,HHV(HIGH,1250))) - (Sum(V,LLV(LOW,250))))
were it not for the fact that this gives the error message "this variable or expression must contain only constant data"
This returns a value and would be OK
((Sum(V,1250)) - (Sum(V,250)))
but for the fact that I don't know where the high/low will be for each stock and do not want to input it manually as I want this for an exploration.
SO: is there a workaround for the fact that the Sum function will only handle a constant, or is there a completely dfferent way of returning the cumulative volume between a high that would have been no more than 1250 bars ago and a low that would have been no more than 20 periods ago in such a way that it can be used for an exploration?
Thanks in advance for any help