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

Re: "Displaced" MA values



PureBytes Links

Trading Reference Links

BM> foolsgold suggested:
BM> System
BM> input: Price(close), Length(5);
BM> Value1=(WAverage(Price,Length)[1]);
if value1 >> value1[1] then buy next bar at market;
Actually I wasn't suggesting the use of displace
I was answering the question, How to convert the Plot1 in the
indicator to Value1 in a system.

BM> So why is it not possible to code the entry to say, "If current bar close is
BM> above the displaced MA(-3)

My TS4 can't displace into the future, but I somehow was under the
impression that, that's why future displacement was introduced in the
newer versions, to allow you to create a leading indicator, and
utilize it in a system.
Don't tell me it's only good for looks?
Maybe you can use the AnyOHLC dll to do that?
best regards
foolsgold

BM> Gary F wrote:
BM> "If you want your system to use the value of Avg that is PLOTTED on bar
BM> X-Displace1 to make buying decisions on that bar, you will need a crystal
BM> ball.  At bar X-Displace1 you DON'T KNOW the value that will be plotted on
BM> that bar!  You won't know it until bar X, several bars later.
BM> "With displaced plots you can make an indicator that LOOKS like it picked
BM> perfect buy/sell points.  But it did that with hindsight.  You can't do it
BM> in realtime.
BM> "Let me know if you find a broker who lets you "displace" your orders into
BM> the past.  :-) "
BM> How strange is it that on the very day this exchange took place I was
BM> struggling to convert the EL indicator displaced code into a system.  Twelve
BM> years of using TS, never once looked at a displaced MA system and here are
BM> two of us on the same day...
BM> Of course, I failed.  No way I could code that displaced MA to give me
BM> today's value.  But I'd like to take one more swing at why not.
BM> foolsgold suggested:
BM> System
BM> input: Price(close), Length(5);
BM> Value1=(WAverage(Price,Length)[1]);
if value1 >> value1[1] then buy next bar at market;
BM> I'm working with a MA displaced into the future (-3) periods.  Of course, I
BM> can't initiate a trade three bars into the future, but I can see the value
BM> of that MA on the current bar.  I can bring up a data window and see both
BM> the close of the current bar and the value of the MA in the current bar.
BM> So why is it not possible to code the entry to say, "If current bar close is
BM> above the displaced MA(-3) [4] " or something to indicate that the trade's
BM> to take place today using today's figure?  If TS can generate the number for
BM> the current bar in current time, why can't the signal see it?
BM> Foolsgold system looks at the value of a MA in the previous bar, but it's
BM> not a displaced MA that he's trying to drag back from the future.
BM> Gary, or anyone else, can you point out the fault in logic?  Or suggest a
BM> way to get the MA code working?
BM> Many thanks,
BM>   Bill M
BM>   Vero Beach  FL