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

Re: [amibroker] Line Thickness



PureBytes Links

Trading Reference Links

Hi Ara,

  This is what I came up with. It seems the width of line varies 
depending upon slope angle.

_By the way thanks for the code._

S1 =  Param("Bline", 35 , 10 , 1 );

B1 = StochD(S1);

thickness  = Param("Thickness",5,1,20,1);

function ThickLine(Value,percent,Color)
{
//find max and min values of chart
barvisible = Status("barvisible");

upperrange = LastValue( Highest( IIf( barvisible, High, 0 ) ) );
lowerrange = LastValue( Lowest( IIf( barvisible, Low, 1e9 ) ) ) ;

Maxheight  = (upperrange - Lowerrange) * percent / 100;

for (i=-5; i<5; i++);

j  = Maxheight / i;

//Draw line across entire screen
V2 = Value - j/2;
V3 = V2 + j;
PlotOHLC(V2,V2,V3,V3,"",Color,styleCloud);

}
thickline(B1,thickness,colorBlack);





















 Kaloustian wrote:
>
> Bruce,
>  
> The code I posted earlier should do what you want. You need to 
> substitute your Stochastic value instead of the value of 85.
>
>     ----- Original Message -----
>     *From:* Bruce Hawkins <mailto:hawkinsk001@xxxxxxxxxxxxx>
>     *To:* amibroker@xxxxxxxxxxxxxxx <mailto:amibroker@xxxxxxxxxxxxxxx>
>     *Sent:* Saturday, December 02, 2006 4:39 PM
>     *Subject:* Re: [amibroker] Line Thickness
>
>     I think I started all of this about a thicker line, what I was
>     trying to do was to get the "StochD - 3",  in this AFL to be thicker.
>
>     _SECTION_BEGIN("Stochastic %D");
>     Plot( StochK( 5 , 3 ), "StochK - 1", colorBlue, styleNoLabel);
>
>     Plot( StochD( 5 , 3 , 3 ), "StochD - 1", colorGreen, styleNoLabel);
>
>     Plot( StochK( 9 , 3 ), "StochK - 2", colorRed, styleNoLabel);
>
>     Plot( StochD( 9 , 3 , 3 ), "StochD - 2", colorOrange, styleNoLabel);
>
>     Plot( StochD( 35 , 10 , 1 ), "StochD - 3",
>     colorBlack,styleNoLabel,styleThick);
>
>     Plot( 20 , "", colorGreen,styleThick);
>     Plot( 80 , "", colorRed,styleThick);
>      ParamStyle("StochK - 1 style" , styleNoLabel);
>      ParamStyle("StochD - 1 style" , styleNoLabel);
>      ParamStyle("StochK - 2 style" , styleNoLabel);
>      ParamStyle("StochD - 2 style" , styleNoLabel);
>      ParamStyle("StochD - 3 style" , styleNoLabel);
>
>     _SECTION_END();
>
>     Is there anyway to create another line with the same parameters
>     but displace it right next to the original to get it thicker?
>
>     thanks,
>
>     p.s. I am sure you have heard of the phrase "a little knowledge is
>     dangerous, well look where no knowledge gets you"
>
> 
> ------------------------------------------------------------------------
>
> Internal Virus Database is out-of-date.
> Checked by AVG Free Edition.
> Version: 7.1.408 / Virus Database: 268.13.9/490 - Release Date: 10/20/2006
>   


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.15.6/566 - Release Date: 12/3/2006 4:36 PM