Text title for Ribbon

I can drop a ribbon on a chart showing an index such as ^DJI. How do I attach a Text word to this ribbon so I know which Index I am looking at.
I have tried the following:-
GfxSetBkMode(1); // Set transparent mode
X=Param("ml",1000, 1, 2000, 1);//1130;
Y=Param("mk",10, 1, 2000, 1);//172;
Font=10;
GfxSetTextAlign( 2 | 0 ); // x= 0L-6-2R; y= 24Baseline, 8Bottom, 0Top;
GfxSelectFont("Impact",Font, 200);GfxSetTextColor(colorBlack);
//GfxTextOut("^DJI Dow-Jones-Weekly",x,y);
GfxTextOut( "DJI Dow-Jones-Weekly", Status("pxwidth")/2, Status("pxheight")/2 );
However, the above only places the text relative to the X & Y co-ordinate position, it does not attach the text to the ribbon itself. The problem arises when the chart height is changed, it moves the text away from the ribbon, and can hide the text outside of the window so the text can no longer be seen.
I tried adjusting GfxSetTextAlign, but this only changes alignment within hidden text box, not in relation to the window the Ribbon is in. (It would be nice to change y from the top of chart to bottom ref).

How do I attach a Text word to this ribbon so I know which Index I am looking at?
A text word (eg 'Buy') can be attached to a particular 'Close', but a ribbon does not appear to have a reference to enable attachment of text words.

For interest, I found the following programming that help anchor the text "^DJI" at the bottom right corner.

 pxHeight = Status( "pxchartheight" ) ;
 y = pxHeight;
 GfxSelectFont( "Tahoma", 9, 100 );
 GfxSetBkMode( 1 );
 GfxSetTextColor( colorBlack );
 GfxTextOut( ( "^AXJO"),1195,y-8);

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.