How to create a BarsFuture(), i.e. a BarsSince() that finds the next
true bar instead
of the last true bar? After creating a binary wave, I would like to find the distance (in
bars) to the _next_ true value relative to the current bar (which
could be anywhere from 3 to hundreds of bars away), any idea how to
I want to use it in further calculations to create an indicator, not
a predictive one of course, but to describe the price data.
Failed attempts so far:
Ref() - needs a constant
Nested If()'s - Can't get any accuracy since using 100's of if()'s
is not workable
Ref(), LastValue() & PREV - looked very promising by I haven't
managed to get it to work.
Any and all help greatly appreciated!
Change your thinking and count from the second event back to the first
instead of forward from the first to the second. The results will be the
IMO this is akin to the different perspective between "set-up today and buy
tomorrow", and "set-up yesterday and buy today". The reality doesn't change
but your one's perspective does. One is in the present looking into the
future and the other is in the present looking into the past. It just so
happens that the MetaStock tools are better suited to a "in the present
looking backward" perspective.
Just my opinion. I don't want to start a philosophical discussion but rather
to point out that a little lateral thinking goes a long way in solving
> to point out that a little lateral thinking goes a long way
I'm almost horizontal, and I _still_ don't get it!-)
I'm sure I'm missing something obvious, but:
I'm not calculating the distance between two events, but instead
from the _current bar_ until the next event. Knowing this distance,
I then plan to calculate & plot a value _at each_ current bar, and
this value will change for every bar since distance (and price)
changes at each bar. If I 'wait' with the calculation until the next
event, I can only plot a value at that event, but not at the dozens
of bars between events.
Is this even possible in MS? Or is it just impossible to make me get
This is from another group. See if it gives you any ideas.
a user asked if the tommorows close could calculated which would
cause the MACD to cross the 0 line, or the trigger line. we worked
it out and got: