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

RE: [amibroker] Is there any way to write the selected interval (h,d,w,m) in the title bar ?



PureBytes Links

Trading Reference Links

Small correction:

Plot(C,"",colorGreen,styleBar);

 pivotlow = Ref(L,-1)>L AND L<Ref(L,1);
 y0=SelectedValue(ValueWhen(pivotlow,L,2));
 y1=SelectedValue(ValueWhen(pivotlow,L,1));
 x0=SelectedValue(ValueWhen(pivotlow,Cum(1)-1,2));
 x1=SelectedValue(ValueWhen(pivotlow,Cum(1)-1,1));
 Cond=y1>y0;
 Line=LineArray(x0,y0,x1,y1,1);
 Plot(IIf(Cond,Line,Null),"",colorBlue,styleLine|
 styleThick|styleNoRescale|styleNoLabel);
 PlotShapes((Cum(1)-1==x0 OR Cum(1)-1==x1)
 *shapeSmallCircle,colorBlue,0,L); 
 PlotShapes((cond AND Cross(Cum(C<Line AND Cum(1)-1>x1),0))
 *shapeDownArrow,colorRed,0,H);
 

Title="TD Demand Line";
GraphXSpace=4;




--- In amibroker@xxxxxxxxxxxxxxx, "johsun" <johanskatt@xxxx> wrote:
> Hi,
> 
> Here's my take on it.
>  Problem with LineArray function is that it only takes numbers not 
> arrays thus cannot be backtested (at least I don't thick it can). 
> Input has to be LastValue or SelectedValue.
> 
> The code:
>  
> Plot(C,"",colorGreen,styleBar);
> 
>  pivotlow = Ref(L,-1)>L AND L<Ref(L,1);
>  y0=SelectedValue(ValueWhen(pivotlow,L,2));
>  y1=SelectedValue(ValueWhen(pivotlow,L,1));
>  x0=SelectedValue(ValueWhen(pivotlow,Cum(1)-1,2));
>  x1=SelectedValue(ValueWhen(pivotlow,Cum(1)-1,1));
>  Cond=y1>y0;
>  Line=LineArray(x0,y0,x1,y1,1);
>  Plot(IIf(Cond,Line,Null),"",colorBlue,styleLine|
>  styleThick|styleNoRescale|styleNoLabel);
>  PlotShapes((Cum(1)-1==x0 OR Cum(1)-1==x1)
>  *shapeSmallCircle,colorBlue,0,L); 
>  PlotShapes((cond AND Cross(Cum(C<Line),0) AND Cum(1)-1>x1)
>  *shapeDownArrow,colorRed,0,H);
>  
> 
> Title="TD Demand Line";
> GraphXSpace=4;
> 
> Johan




------------------------ 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/mOAaAA/3exGAA/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 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

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