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

Re: [amibroker] Re: Please help with this code - trendline to the right of the chart


  • Date: Fri, 12 Feb 2010 10:36:51 +0100
  • From: reinsley <reinsley@xxxxxxxx>
  • Subject: Re: [amibroker] Re: Please help with this code - trendline to the right of the chart

PureBytes Links

Trading Reference Links

Rick,


I was looking for such a code. A cornerstone for my need.

Thanks for sharing.

Best regards


Le 12/02/2010 04:56, ricko8294_98 a écrit :
>
>
>
> try this...
>
> function Howlong( indicator, Length )
> // a length of 0 will place a dot at the last bar
> {
>
> Start = LastValue( Cum( 1 ) - Length ) == Cum( 1 );
> Start2 = Cum( Start ) == 1;
> x = ValueWhen( Start2 , indicator, 1 ) ;
> return x;
> }
>
> LBPeriod = Param("Lookback Period",50,5,200,1);
> HHValue = LastValue( Ref( HHV( H, LBPeriod ), -1 ) );
> HHPoint = BarsSince( H == HHValue );
>
> Plot( C, "", colorRed, 64 );
> trigger = LastValue( Cross( C , HHValue ) );
>
> if ( trigger )
> {
> Plot( Howlong( HHValue , HHPoint ), "", colorYellow, 1 );
> }
>
> Best regards
> Rick
> --- In amibroker@xxxxxxxxxxxxxxx <mailto:amibroker%40yahoogroups.com>,
> "tradinghumble" <sharp2be@xxx> wrote:
>  >
>  > I would like have a trendline every time the Close is higher than the
> last 50 closes... the trendline should be drawn from the point all the
> way to the right of the chart.
>  >
>  > Can anyone please point me in the right direction?
>  >
>
> 



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

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