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

[amibroker] Re: Standard Error bands - Indicator


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] Re: Standard Error bands - Indicator
  • From: "dcrotty2003" <dcrotty2003@xxxxxxxxxxxx>
  • Date: Sat, 20 Dec 2003 14:52:23 -0800
  • In-reply-to: <DMEDJAMKNDFPLGAOOJHCAEBKDHAA.williampeters@xxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

Hi William,

Maybe it's just me, but the Param:

Periods= Param("Periods", 3, 1, 100, 1);

...doesn't seem to work.

Dave.

--- In amibroker@xxxxxxxxxxxxxxx, "William Peters" 
<williampeters@xxxx> wrote:
> Hi,
> 
> Just sharing some code that I originally found on this forum 
(somewhere) and
> was subsequently found to be wrong. Tomasz has made the 
corrections so here
> it is. I've also added it to the AFL library on the AmiBroker web site.
> 
> /* Standard Error Bands */
> Var= Param("Standard Error", 18, 1, 100, 1);
> Periods= Param("Periods", 3, 1, 100, 1);
> 
> function SteBand( array, periods, upper )
> {
>   Lr = LinearReg( array, periods );
>   se = StdErr( array, periods );
>   return LR + IIf( upper, 1, -1 ) * 2 * se;
> }
> 
> upperstderrband = SteBand( C, Var, True );
> lowerstderrband = SteBand( C, Var, False );
> midstderrband = (upperstderrband + lowerstderrband )/2;
> 
> Plot(upperstderrband ,"upperstderrband ",colorGreen,4);
> Plot(Close,"Close",colorBlack,styleCandle);
> Plot(lowerstderrband ,"lowerstderrband ",colorRed,4);
> Plot(midstderrband ,"midstderrband ",colorBlack ,styleLine);
> GraphXSpace = 3;
> Regards,
> William Peters
> www.amitools.com


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/