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

Re: [amibroker] write a text juste above a ribbon



PureBytes Links

Trading Reference Links

Hi,

here are some code fragments to check out...

if (IsNull(VarGet("DebugAreaOffset")))
    DebugAreaOffset = 0;
...
_N(DebugPlotLevelParam = ParamList("Chart debug level", 
"Area|Plot|Both|Off", 3));
...
function DebugArea(PlotName, Color)
{
    if (DebugPlotLevelParam == "Both" OR DebugPlotLevelParam == "Area")
    {
        Plot(DebugAreaOffset+1, PlotName, Color, styleOwnScale | styleArea | 
styleNoTitle | styleNoLabel, 0, 100);
        GfxSetBkMode(1);        //transparent
        GfxSetTextAlign(10);    //right, buttom
        GfxSelectFont("Ariel", 6, 300, True, False, 0);
        GfxSetTextColor(colorBlack);
        GfxTextOut(PlotName, Status("pxchartright") - 5, 
Status("pxchartbottom") * (100 - DebugAreaOffset) / 100);
    }
    DebugAreaOffset++;
}

Hope it give some idea.
Regards,

Y
--------------------------------------------------
From: "reinsley" <reinsley@xxxxxxxx>
Sent: Monday, March 02, 2009 1:08 PM
To: "AB User's list" <amibroker@xxxxxxxxxxxxxxx>
Subject: [amibroker] write a text juste above a ribbon

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


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

**** 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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/