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

Re: [amibroker] Re: Multi Row Colored Ribbons



PureBytes Links

Trading Reference Links

MM:

To solve text positioning, try replacing "BarCount - 157" with textOffset below:

barsInView = Status("firstvisiblebarindex") - Status("lastvisiblebarindex) - 10; //10 is number of blank bars at right

barOffset = Param("Offset Bar", .99, 0, 1, .01);

textOffset = BarCount - (barOffset * barsInView);
Bill

----- Original Message ----- 

From: "MarketMonk777" <dlittner@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, July 25, 2006 11:58 AM
Subject: RE: [amibroker] Re: Multi Row Colored Ribbons


> 
> What do you mean by missing?  Not showing up on your chart?
> 
> Shoot me a picture of your chart, I think I might know what the problem is
> but it is hard to explain.
> 
> Dave
> D l I t t n e r at e a r t h l I n k . N e t  
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of Terry
> Sent: Tuesday, July 25, 2006 8:16 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: Multi Row Colored Ribbons
> 
> Thanks. Works great except your PlotText is missing from this version.
> --
> Terry
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
> Of MarketMonk777
> Sent: Tuesday, July 25, 2006 08:41
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: Multi Row Colored Ribbons
> 
> Hi Terry,
> 
> No I have not posted the code yet so here it is: 
> Btw - I found that it works by having each ribbon as it's own section
> 
> 
> _SECTION_BEGIN("RSI Color Bar");
> RSIColor = IIf( RSI(14) > 70, colorRed, IIf( RSI(14) < 30, colorGreen,
> colorYellow)); Plot( 10, "", RSIColor, styleArea|styleOwnScale|styleNoLabel,
> 0, 100); Plot( 11,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100
> ); PlotText("RSI-14", BarCount-157, 41.00, colorBlack); _SECTION_END();
> 
> 
> _SECTION_BEGIN("MACD Color Bar");
> m = MACD();
> s = Signal();
> MACDColor = IIf( m > s, colorGreen, colorRed); Plot( 20, "", MACDColor,
> styleArea|styleOwnScale|styleNoLabel, 0, 100); Plot(
> 21,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
> PlotText("MACD", BarCount-157, 41.05, colorBlack); _SECTION_END();
> 
> 
> _SECTION_BEGIN("21 Day RangeColor Bar");
> H21 = HHV(H,21);
> // Highest High over last 21 days
> L21 = LLV(Low,21);
> // Lowest Low over last 21 days
> P21DR = ( (Close - L21) / (H21 - L21) ) * 100;
> // Calculate where the close is in relation to this 21 day range
> R21 = (255 - ( (P21DR/100)*255 ) );
> // Red Color component
> G21 = (P21DR/100)*255;
> // Green Color component
> Plot( 30, "", ColorRGB(R21,G21,0), styleArea|styleOwnScale|styleNoLabel,
> 0,
> 100);
> Plot( 31,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
> PlotText("21Day Range", BarCount-157, 41.09, colorBlack);
> _SECTION_END();
> 
> 
> 
> _SECTION_BEGIN("250 Day RangeColor Bar");
> HH250 = HHV(H,250);
> // Highest High over last 250 days
> LL250 = LLV(L,250);
> // Lowest Low over last 250 days
> P250DR = ( (Close - LL250) / (HH250 - LL250) ) * 100;
> // Calculate where the close is in relation to this 250 day range
> R250 = (255 - ( (P250DR/100)*255 ) );
> // Red Color component
> G250 = (P250DR/100)*255;
> // Green Color component
> Plot( 40, "", ColorRGB(R250,G250,0),
> styleArea|styleOwnScale|styleNoLabel,
> 0, 100);
> Plot( 41,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
> PlotText("250 Day Range", BarCount-157, 41.1325, colorBlack);
> _SECTION_END(); 
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf
> Of Terry
> Sent: Tuesday, July 25, 2006 7:29 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Multi Row Colored Ribbons
> 
> Cool chart, even if it doesn't have application :-) Did you post the
> final
> code that creates this? I must've missed it.
> 
> Thanks.
> --
> Terry
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "MarketMonk777" <dlittner@xxx> wrote:
>>
>> This is purely experimental and may turn out to be a waste of time.
> > Your idea has merit and will file it away should I ever go so far
>> as converting any of them to "buy" signals. 
> 
>> > Long_color = up; //"up" is your variable.
>> > Short_color =  down; //daown is your variable too.
>> > dynamic_color = IIf(Long_color, colorGreen , IIf(Short_color,
>> colorRed ,
>> > colorBlue)) ;
>> > 
>> > Plot( MACD()  , "MACD" , dynamic_color , ParamStyle ("Style" ,
>> > styleNoLabel| styleThick ) );
> 
> 
> 
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor --------------------~-->
> GFT
> Forex Trading Accounts As low as $250 with up to 400:1 Leverage. Free
> Demo.
> http://us.click.yahoo.com/lpv1TA/jlQNAA/U1CZAA/GHeqlB/TM
> --------------------------------------------------------------------~-> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to SUPPORT
> {at}
> amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.4/396 - Release Date: 07/24/06
> 
>