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

RE: [amibroker] Re: plot display problem



PureBytes Links

Trading Reference Links

Dennis, here is a version I did for the same thing but the values of the
added day are Null, it may solve part of your problem

//INDICATOR
//Allows to add in tomorrows prices to see the effect on the indicator
//Graham Kavanagh March 2003 / Aug 2003
x = 0.1;//range of prices in the param function
y = 0.01;//step of price within the param function
xo = LastValue(Ref(O,-1));
O = IIf(DateNum()==LastValue(DateNum()),Param("O",Null,xo-x,xo+x,y),O);
xh = LastValue(Ref(H,-1));
H = IIf(DateNum()==LastValue(DateNum()),Param("H",Null,xh-x,xh+x,y),H);
xl= LastValue(Ref(L,-1));
L = IIf(DateNum()==LastValue(DateNum()),Param("L",Null,xl-x,xl+x,y),L);
xc = LastValue(Ref(C,-1));
C = IIf(DateNum()==LastValue(DateNum()),Param("C",Null,xc-x,xc+x,y),C);

Plot(C,"Param input for tomorrows prices",colorBlack,styleCandle);

//Add in your indicator here
Plot(StochD(14),"stochD",colorGreen,styleLine+styleOwnScale);
Plot(StochK(14),"stochK",colorRed,styleLine+styleOwnScale);
//Plot( EMA (C,10),"EMA",colorBlue,styleLine);

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


-----Original Message-----
From: dennisconnaccesstoledocom [mailto:dennisconn@xxxxxxxxxxxxxxxx] 
Sent: Saturday, 30 August 2003 8:04 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: plot display problem


--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> You cannot plot anything to the right of the existing price array
from an
> indicator, only manual lines etc can be drawn there
> The only thing I can suggest to is plot the price bars backwards Here 
> is one I did a while ago that allows for adding a day's prices
to see
> the effect on an indicator. You could replace the Stochastics with
MA
> 
> 
> //INDICATOR
> //Allows to add in tomorrows prices to see the effect on the
indicator

<SNIP>

Hi Graham,

Thanks for the response; you inadvertantly solved a different problem 
I hadn't yet tackled (creating fictional prices for the next day to 
see the effect on an indicator). Thanks again for that! I'll give 
your code a try.

I might point out that I've already tried to displace the price bars 
backwards, but doing so distorts the price display (at least in 
candlestick mode, which I prefer). Interestingly, when I plot price 
in close-only line style, I CAN displace the price plot back without 
the distortion, and adjust the moving average displacement to achieve 
my desired result. There are two minor glitches when doing so, 
however: 1) the last period's closing price is repeated to the right 
of the last period, along with the MA, and 2) the X axis doesn't 
displace along with the prices. 

I had hoped for a better solution which would produce a cleaner 
display, so perhaps a suggestion to Tomasz for this feaature in a 
future version is in order. He doesn't have anything else to do, 
right? ; )

Anyway, thanks again; I've been going nuts trying to figure it out. 
At least I didn't miss some obvious feature in the documentation, so 
I didn't get a response of "RTFM."

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/ 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/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/