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

RE: [amibroker] Plot into Future



PureBytes Links

Trading Reference Links

I don't think you can plot beyond the last period.
One suggestion could be to slide the plots and insert an extension to the
ema.
Here is a very rough idea of how to do it
period = 10;
x= EMA(C,period);
y = Ref(x,10);
slope = x - Ref(x,-1);
bar1 = LastValue(Cum(1))-period;
Line = IIf(BarIndex()<=LastValue(BarIndex())-period,y,Null);
extension =
IIf(BarIndex()<=LastValue(BarIndex())-period-1,Null,LastValue(x)+LastValue(s
lope)*(Cum(1)-bar1) );
O=Ref(O,period);
H=Ref(H,period);
L=Ref(L,period);
C=Ref(C,period);
Canstyle =LastValue(
IIf(BarIndex()<=LastValue(BarIndex())-period,styleLine,styleCandle));
C = IIf(BarIndex()<=LastValue(BarIndex())-period,C,Null);

Plot(C,"chart",colorBlack,styleCandle);
Plot(Line,"adjusted ema",colorBlue,styleLine);
Plot(x," original ema",colorGreen,styleLine);
Plot(extension,"ext to ema",colorRed,styleLine);

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia

-----Original Message-----
From: Joe Maywood [mailto:jmaywood@xxxxxxxxxxx] 
Sent: Wednesday, 2 April 2003 7:43 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Plot into Future

Is it possible to plot into the future with AB? For example, to
project a moving average forward and plot it along with current price
data... Any examples?

-- 
Thanks,
  Joe

jmaywood@xxxxxxxxxxx




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/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save Smiley. Help put Messenger back in the office.
http://us.click.yahoo.com/4PqtEC/anyFAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/