Here is the little stuff. The idea is to decipher a trend-counter 
  
trend-trend.
Best Regards
// Trix Bars number
// Trix 
  Bars number for each swing
periods = Param( "Periods", 5, 2, 200, 1 
  );
TrixOnClose = Trix( periods );
uptx = TrixOnClose >= Ref( 
  TrixOnClose, -1 );
dntx = TrixOnClose <= Ref( TrixOnClose, -1 
  );
Peaktrix = TrixOnClose > Ref( TrixOnClose, -1 )AND TrixOnClose 
  > Ref( 
TrixOnClose, 1 );
Troughtrix = TrixOnClose < Ref( 
  TrixOnClose, -1 )AND TrixOnClose < Ref( 
TrixOnClose, 1 ) 
  ;
BarsUp = BarsSince( dntx );
BarsDn = BarsSince( uptx 
  );
Colortx = IIf( uptx , colorGreen, IIf( dntx , colorRed, colorGreen ) 
  );
Plot( TrixOnClose, "Trix (" + periods + ")" , Colortx, styleThick 
  );
// Trix's ribbon
Ribbon = IIf( uptx , colorBrightGreen, IIf( dntx 
  , colorRed, 
colorBrightGreen ) );
Plot( 3, "", Ribbon , styleOwnScale | 
  styleArea | styleNoLabel, 0, 100 );
// plot a text at 5% from bottom's 
  pane
percent = Param( "PositText%", 5, 2, 90, 0.5 );
Miny = Status( 
  "axisminy" );
Maxy = Status( "axismaxy" );
y = Miny + ( Maxy - Miny ) * 
  percent / 100; // at 5 % above bottom of 
the pane
for ( i = 0; i 
  < BarCount; i++ )
{
if ( Peaktrix [i] )
PlotText( "" + BarsUp [ i 
  ], i - BarsUp [ i ] / 2 + 1, y, 
colorGreen );
if ( Troughtrix [i] 
  )
PlotText( "" + BarsDn [ i ], i - BarsDn [ i ] / 2 + 1, y, 
colorRed 
  );
}
GraphXSpace = 10;
reinsley a écrit 
  :
>
>
> Thank you Aron, it's what I was looking 
  for.
>
> Yofa, I keep your code to learn more about Gfx. Thank 
  you
>
> Best regards
>
> Aron a écrit :
> 
  >
> > |
> > Plot(*C*,"Price", *colorBlack*, 
  *styleLine* );
> >
> >
> > Miny = 
  Status("axisminy");
> > Maxy = Status("axismaxy");
> 
  > y= Miny+ (Maxy - Miny) *20/100; // at 20%
> >
> > 
  *Buy*= Cross(RSI(), 50);
> > *for*( i = 0; i < *BarCount*; i++ 
  )
> > {
> > *if*( *Buy*[i] ) PlotText( "Buy:\n" + *C*[ i ], 
  i, y, *colorGreen* );
> > }
> > |
> >
> > 
  reinsley wrote:
> >
> >> Hi,
> >>
> 
  >> How can I write a text juste above a ribbon ?
> 
  >>
> >> I saw the KB's plot text examples but they refered 
  to High, Low ...
> >>
> >> Ribbon defines its height 
  in percent of pane width and I suppose 
> starts
> >> from 
  the bottom
> >>
> >> How can I place some text in % of 
  a pane (Y axis) or always at the
> >> bottom of a pane ?
> 
  >>
> >> Thank you for the help.
> >>
> 
  >> Best regards
> >>
> >> 
  _SECTION_BEGIN("trending ribbon");
> >> 
  uptrend=PDI()>MDI()AND Signal()<MACD();
> >> 
  downtrend=MDI()>PDI()AND Signal()>MACD();
> >> 
  Plot( 6, "ribbon",
> >> IIf( uptrend, colorGreen, IIf( downtrend, 
  colorRed, 0 )),
> >> 
  styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
> >> 
  _SECTION_END();
> >> dist = ATR(10);
> >> for( i 
  = 0; i < BarCount; i++ )
> >> {
> >> if( uptrend[i] 
  ) PlotText( "Buy" + dist[ i ], i, dist[ i ]-dist[i],
> >> 
  colorGreen );
> >> //if( downtrend[i] ) PlotText( "Sell" + dist[ i 
  ], i, dist[ i 
> ]+dist[i],
> >> colorRed, colorYellow 
  );
> >> }
> >>
> >>
> 
  >>
> >> 
  ------------------------------------
> >>
> 
  >> **** 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/ 
  <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/ 
  <http://www.amibroker.com/devlog/>
> 
  >>
> >> Yahoo! Groups Links
> >>
> 
  >>
> >>
> >>
> >
> 
  >
>
>