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

[amibroker] plot display problem



PureBytes Links

Trading Reference Links

This may be something of a duplicate post, as I haven't yet seen my 
original query in the message index. If so, I apologize; but this 
second attempt might better state my question...

Even though I've searched the discussion boards and the mailing list 
archives, I've not found an answer to this: how does one write a code 
to plot a forward displaced moving average so that it can be 
displayed in the space to the right of the last price bar?

Put another way, if I plot a moving average so that it's displaced 
forward 3 periods, I'd like to be able to plot where it will be in 
the future, 1 to 3 periods past where the most current price data 
ends. Here's the code I'm using:

// Displaced Moving Averages (insert this code into "Built-in / 
Price" edit pane above "//--Indicator-End--" line)
MA1 = Param ("MA1 length", 3, 2, 99, 1);
D1 = Param ("MA1 displacement", -3, -9, 9, 1);
Plot (Ref (MA (C, MA1), D1), "DMA1", 42);

The code works fine, except that the plot of the forward displaced 
moving average is truncated at the last price bar on the chart, so 
that the last 3 values of the MA aren't displayed.

Unless I've missed something in the manual, I can't figure out how to 
code it to display the MA as I'd like. Any solution?

DC



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/