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

RE: [amibroker] Re: Unusual Plotting Behavior



PureBytes Links

Trading Reference Links

Bill: many thanks!!!!  I first entered TJs suggestion of setbarsrequired,
and it eliminated the erratic plotting (as he explained, without it, it used
all bars in first establishing the plot but then used fewer bars for
subsequent actions).  However, your code is more accurate, unless I
substitute SLPIK[1], SHPIK[1], which makes them the same, but even then it
does not match the RS value plotted in FT.  Do you have some AFL code that
exactly matches the FT chart program?

Ken

________________________________

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Bill Barnard
Sent: Friday, January 20, 2006 7:11 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Unusual Plotting Behavior


Ken,

Not sure about the cause of your unusual plotting, but try the
following substitution to get FastTack RS values:

Instead of 

StartPLong=SLPIK[5];
StartPShort=SHPIK[5];

use

num1            = IIf(IsEmpty(SLPIK[BarCount - 1]), 1, 
                        LastValue(Cum(NOT IsEmpty(SLPIK))));
num2            = IIf(IsEmpty(SHPIK[BarCount - 1]), 1, 
                        LastValue(Cum(NOT IsEmpty(SHPIK))));
mutualMax      = Min(num1, num2);
startIndex      = BarCount - mutualMax;
si                  = startIndex;
StartPLong      = SLPIK[si];
StartPShort      = SHPIK[si];



--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
>
> I wish to plot the Relative Strength chart from the FastTrack charting
> program; many of your are familiar with the chart.
> 
> The calculation for the RS of two price series, according to the
help file
> is:
> 
> RS= (Todays1stPrice/1stPricefromBeginningofSeries) /
>       (Todays2ndPrice/2ndPricefromBeginningofSeries) *10
> 
> So, I tried the following code.  I noticed that the first 4 dates in the
> series were blank, so I elected to use the fifth day of price data
for each
> of two series.  In the following, SLPIK and SHPIK are two price series
> (surrogates for the SLPIX and SHPIX Profunds mutual funds).
> 
> SLPIK=Foreign("SLPIK","C");
> SHPIK=Foreign("SHPIK","C");
> 
> Pr=24;
> Pr2=44;
> StartPLong=SLPIK[5];
> StartPShort=SHPIK[5];
> RS1=SLPIK/StartPLong;
> Rs2=SHPIK/StartPShort;
> RS=(RS1/Rs2)*10;
> 
> ShortSma=MA(RS,Pr);
> LongSMA =MA(RS,Pr2);
> Plot(ShortSma,"",6,4);
> Plot(LongSMA,"",11,4);
> Plot(RS,"RS",colorYellow,4);






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





________________________________

YAHOO! GROUPS LINKS 


	*	 Visit your group "amibroker
<http://groups.yahoo.com/group/amibroker> " on the web.
	  
*	 To unsubscribe from this group, send an email to:
	 amibroker-unsubscribe@xxxxxxxxxxxxxxx
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
	  
*	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 


________________________________



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date: 1/19/2006



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.21/236 - Release Date: 1/20/2006
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.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/