PureBytes Links
Trading Reference Links
|
Nice ! I like the display (see attachment) with 'zero' on left with
year-to-date/6-months, performance shown ... but 'zero' in middle also looks nice.
Regards,
- Salil V Gangal
--- wecus <member@xxxxxxxx> wrote:
> You could shift the 'zero' to the middle of the visible chart as
> well...
>
> Regards
> Andreas
>
> CompareTicker = ParamStr( "Compare "+Name()+" with:","^IXIC" );
>
> BarIsVisible = Status("barvisible");
> firstBarVisible = BarIsVisible AND NOT Ref( BarIsVisible, -1 );
> BarsVisible = LastValue(BarsSince (FirstBarVisible))+1;
>
> ZeroTrigger = BarsVisible/2; //Days to go back for ZeroPoint
>
> TimeArray = IIf (BarIndex () < LastValue( BarIndex()) - ZeroTrigger
> +1 ,0,1);
> ZeroPoint = TimeArray AND NOT Ref( TimeArray, -1 );
> ZeroPointValueTicker = LastValue( ValueWhen (ZeroPoint,C));
>
> ScaledTickerArray = 100 * C / ZeroPointValueTicker;
> Plot(ScaledTickerArray,Name(),colorRed,styleLine);
>
> CompareArray = Foreign(CompareTicker,"C");
> ZeroPointValueCompare = LastValue( ValueWhen
> (ZeroPoint,CompareArray));
>
> ScaledCompareArray = 100*CompareArray / ZeroPointValueCompare;
> Plot(ScaledCompareArray,CompareTicker,colorBlue,styleLine);
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Salil V Gangal"
> <salil_gangal@xxxx> wrote:
> > Wecus / Tomasz,
> >
> > The purpose of my original script was to get display similar to
> > FastTracks's. With this added flexibility of comparing with
> > parameter'ed security, I like it even more.
> >
> > Regards,
> > - Salil V Gangal
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
> <amibroker@xxxx>
> > wrote:
> > > Hello,
> > >
> > > Use ParamStr instead http://www.amibroker.com/f?paramstr
> > >
> > >
> > > Best regards,
> > > Tomasz Janeczko
> > > amibroker.com
> > > ----- Original Message -----
> > > From: "wecus" <member@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Tuesday, May 18, 2004 1:35 PM
> > > Subject: [amibroker] Input Box on performance charts?
> > >
> > >
> > > > I tried to apply an Input Box to Salils scaled arrays
> > > >
> > > > http://finance.groups.yahoo.com/group/amibroker/message/63680
> > > >
> > > > - it would certainly be nice to be able to select *which* stock
> > you
> > > > want to compare. Unfortunately the dialog is permanently
> popping
> > up,
> > > > this happens because the indicators are permanently refreshed.
> > > >
> > > > maybe somebody here knows how to work around this issue?
> > > >
> > > > EnableScript("vbscript");
> > > > Ticker = Name();
> > > > CompareSymbol = "^IXIC";
> > > >
> > > > // Chart display similar to FT
> > > > barvisible = Status("barvisible");
> > > > firstBarVisible = barvisible AND NOT Ref( barvisible, -1 );
> > > >
> > > > <%
> > > > temp=AFL("CompareSymbol")
> > > > temp=inputbox("Compare current stock with:","AvW Utilities for
> > > > AmiBroker",temp)
> > > > AFL("CompareSymbol")=temp
> > > > %>
> > > >
> > > > // code block for compare ticker
> > > > array1=Foreign(CompareSymbol,"C");
> > > > scaledArray1=100*(array1/ValueWhen(firstBarVisible,array1)-1);
> > > > Plot(scaledArray1,CompareSymbol,colorBlue,styleLine);
> > > >
> > > > // code block for actual (selected) ticker
> > > > ticker2 = Name();
> > > > scaledArray2=100*(C/ValueWhen(firstBarVisible,C)-1);
> > > > Plot(scaledArray2,ticker2,colorRed,styleLine);
> > > >
> > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
>
>
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/
Attachment:
Description: ""
|