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

Re: [amibroker] Re: Something New?



PureBytes Links

Trading Reference Links

It's just much nicer to see a german stock compared with the dax 
without having to change things manually. So I added different 
default values for the comparison, aplly your own needs everybody..

if (GroupID() == 6 OR 7 )
CompareTickerDefault = "^GDAXI";
else
CompareTickerDefault = "^IXIC";

CompareTicker = ParamStr( "Compare "+Name()+" 
with:",CompareTickerDefault);

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);





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