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

Re: Predicting price function?



PureBytes Links

Trading Reference Links

"Brad Lambert" <bradl@xxxxxxxxxxxxxx> writes:
>I'm trying to write a function (call it RSI_cross for example)
>that will calculate the price level necessary to fulfil a certain
>criteria (lets say I want to buy when the RSI crosses above 50 for
>example).
>
>Writing code such that a system enters on a close that fulfils this
>condition is not hard. But I want to know "beforehand" what price
>will be needed to satisfy the condition.

I haven't actually tried this with something like RSI, which has
lots of exponential moving averages in its calculation, at least
in the traditional implimentation, but what you want, conceptually
is simply to solve for another variable in an equation.

Suppose your equation were:

	X = A + B * Y

and you want instead to solve for Y.  Then you'd have:

	Y = (X - A) / B

You might see if this idea could be used to solve your problem.

Jim