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

Re: [amibroker] Re: Selector line appearing on top of styleCloud plot



PureBytes Links

Trading Reference Links

Sidhartha,

Here is the fancy version.  I have not tested this as typed here, but  
it should work.

The general idea is to create a boolean array with a true entry for  
the selected bar.

Then, plot the array as a histogram.

Here is a function to plot vertical lines on top of the chart with a  
break around the price bars so it does not obscure them:

//================================================================
// Plot Vertical Line leaving a gap around the price bars
// Style = styleDashed|styleThick etc.
// mode = 1: bot only, 2: top only, 3: both
// Offset is in pixels
procedure PlotVert(array, mode, color, style, Offset)
{
	botLine = Status("axisminy");
	topLine = Status("axismaxy");
	Offset = PixelsToYAxis(Offset);
	LineStyle = styleOwnScale|styleNoLabel|styleHistogram|style;
	if(mode&1){Plot((array>0)*(L-Offset), "",  
color,LineStyle,botLine,topLine);}
	if(mode&2){Plot((array>0)*(H+Offset-topLine), "",  
color,LineStyle ,botLine-topLine,0);}
}

// Plot a line for the selected bar on top
BarIdx = BarIndex();
SelectedBar = SelectedValue(BarIdx) - BarIdx[0];
PlotVert(SelectedBar, 3, colorRed, styleThick, 10);


On Sep 15, 2008, at 3:03 PM, sidhartha70 wrote:

> Sorry dennis... not quite sure what you mean.
>
> Can you give me an example...?
>
> TIA
>
> --- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>>
>> Hi Sidhartha,
>>
>> Just plot it on top yourself with a vertical line Histogram plot.
>>
>> BR,
>> Dennis
>>
>> On Sep 15, 2008, at 1:14 PM, sidhartha70 wrote:
>>
>>> Hi all,
>>>
>>> Is it possible to make the selector line appear on top of a  
>>> styleCloud
>>> plot....??
>>>
>>> TIA
>>>
>>>
>>> ------------------------------------
>>>
>>> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
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/