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

Re: [amibroker] Windows scripting



PureBytes Links

Trading Reference Links

Thanks Anthony,

That's great, but is there anyway of putting it in an indicator so it 
draws a line?

I've got this far - 

/* Draw a line from Close 120 days ago to Close today */
y0 = 0.9; // Can't work out how to get close on day -120
y1 = 1.2; // Can't work out how to get close on last day
x1 = LastValue( Cum( 1 ) );  
x0 = x1 - 120; 
Line = LineArray( x0, y0, x1, y1, 0 ); 
Plot(C, "C", colorWhite, styleCandle); 
Plot( Line, "Trend line", colorBlue ); 


--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxxx> 
wrote:
> Peter,
> 
> AA window:
> Monthly rate of change
> You can use the Param button in AA to select number of months
> n last quotations
> n=1
> 
> //Monthly Rate of Change summed
> 
> MROC = ROC( C, 21 );//approx 21 trading days per month
> 
> Months=Param("Months",6,1,12,1);
> 
> 
> function GetSumOfMonthlyROC( array, howmanyMonths )
> 
> {
> 
> MonthlyROC = ROC( C, 21 );
> 
> 
> MonthlySum = 0;
> 
> 
> for( i = 0; i < howmanyMonths; i++ )
> 
> {
> 
> MonthlySum = MonthlySum + Ref( MonthlyROC, -21 * i );
> 
> }
> 
> 
> return MonthlySum;
> 
> }
> 
> Filter=1;
> 
> AddColumn(GetSumOfMonthlyROC(C, Months ),WriteVal(Months,1)
+"_Months");
> 
> 
> 
> Anthony
> 
> ----- Original Message ----- 
> From: "lamplowman" <lamplowman@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, August 31, 2004 6:33 AM
> Subject: [amibroker] Draw a line in AFL
> 
> 
> >
> > I would like to draw a line in AFL from the close say six months 
ago
> > to close today and also calculate the % gain over that period.
> >
> > I've looked at LineArray but don't seem to be able to work it out.
> >
> > Has anyone already done this?
> >
> > Thanks
> > Peter




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

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/