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

[amibroker] Re: plot display problem



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "johanskatt" <johanskatt@xxxx> 
wrote:
> This code displaces the priceplot, forward or backward, over a 
> stable EMA line.
> 
> disp=Param("Displacement",0,-20,20);
> Ox=IIf(LastValue(Cum(1))-disp>Cum(1),Ref(O,disp),Null);
> Hx=IIf(LastValue(Cum(1))-disp>Cum(1),Ref(H,disp),Null);
> Lx=IIf(LastValue(Cum(1))-disp>Cum(1),Ref(L,disp),Null);
> Cx=IIf(LastValue(Cum(1))-disp>Cum(1),Ref(C,disp),Null);
> PlotOHLC(Ox,Hx,Lx,Cx,"",colorBlack,styleBar);
> Plot(EMA(C,20),"",colorOrange,styleLine);
> 
> /JS

Hi JS,

Thanks for the code - your solution was one I'd considered, but 
didn't know how to code correctly (my attempts always distorted the 
price bars, and all I could do was use a close-only line for the 
price plot to get close to what I wanted).

Thanks to the responses I get, and the archived messages, I might 
actually get somewhat proficient at coding with AFL. Then maybe I can 
pull some of the weight here on the mailing list, as opposed to 
having to just read everyone else's input.

The help is much appreciated,

DC



------------------------ 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/