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

Re: [amibroker] GFX and Plotting in Layers in AB



PureBytes Links

Trading Reference Links

Joe,

I understand what you are saying about the difference between layers  
and plot order, and yes, I have to split up my modular AFL code into  
the part that needs to be executed first for values and some plot  
commands at the end of all the AFL that are executed to get the plot  
order correct for the display.

However, I thought about the problem from my own practical use (which  
uses extensive plot ordering) and could not think of an example where  
I would need more than 16 different "out of order" plots.

I could only think of a use for about 4 independent layers that are  
reset and plotted with their own visibility hierarchy over each other.

Since it may be the case that random plot ordering at the OS graphics  
subsystem level is not available without the concept of layers (I do  
not know this, I am only speculating here), I thought of combining the  
two ideas to get the essential functionality I need.

However, if the graphics subsystem supports it, it would be  
philosophically easy to make the leap to an AFL command that had two  
parameters:  PlotLayer(layerNumber, orderNumber); Plot(...);
That way the Layer and plot order within the layer could be separate,  
but still maintain the backwards compatibility with existing AFL.

~Dennis

On Mar 21, 2008, at 12:56 AM, J. Biran wrote:
>
> AB had some significant improvements and leaps recently in
> its plotting capabilities.
> I would separate plot layer from plot order. Each of them
> has a different purpose and use.
> By plot order I mean which plotted entity covers the ones
> underneath, currently set by location of the command in the
> afl code. I would prefer a "hierarchy" number assigned to
> each instead.
> I would like to see full control of plot order for EACH plot
> command including Gfx low level plots (I believe that
> currently you can have ALL Gfx plot either on top or below
> other graphics but not individually controlled).
> This would enable keeping the location of plot command in a
> logical order where they belong and not force moving all
> plot commands out of their individual sections to the bottom
> of the code, and sorting them based on the desired visual
> plot effects. It would also allow optimizing for execution
> speed by separating fixed labels from continuously changing
> values, or values that change only at new bars.
> Full control of plot layer for each plot command is also
> desired.
> Joseph Biran
> ____________________________________________
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx
> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dennis Brown
> Sent: Thursday, March 20, 2008 6:01 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] GFX and Plotting in Layers in AB
> Hello,
>
> Herman is doing us all a great service with his UKB posts about
> overlay plotting using GFX functions, creating button like functions,
> and chart trading.  Thank you Herman!
>
> I have given a lot of thought about the plotting features of AB and
> how to best use those capabilities in my charts.  I have also run into
> a number of situations that I could not figure out how to do it.
>
> Looking over the AB suggestions list, many are related to increasing
> the capabilities of plotting functions.  When Tomasz released the GFX
> low level plotting functions and recently (beta) some additional mouse
> functions, many more possibilities opened up.  Thank you Tomasz!
>
> Now, I am trying to take stock of where I am at relative to things I
> have wanted to do for a long time.  Perhaps a few more functions are
> needed to realize these, or perhaps there is already a way to do what
> I want.  Here are some of the things I would like to do.  Please
> comment on any of them --especially if you know a way to do them now
> or can think of a better approach as a suggestion.  I am also sounding
> out my understanding of this area, so please correct me where I have a
> misconception.
>
> Plotting from AFL on GFX layers:
>
> So far, the only way I know of to plot on layers from AFL, other than
> the default chart layer is using the PlotShapes() function.  The
> layers seem to be only used for manual study plots.  Layers are locked
> in step with the time scale of the chart, so they align and scroll
> with the chart.  Layers do not erase their plots except by manual
> command.  I suppose that the ability for PlotShapes() to plot on
> layers, is so that AFL can interact with manual cursor selections to
> mark certain events on the chart permanently.  One suggestion I saw
> was for a drag and drop symbol pallet to manually place these.
>
> The GFX functions plot to special GFX only layers --Currently we have
> one layer above the chart plots and one layer below the chart plots.
> These GFX layers are pixel oriented, and are not aligned to the chart
> time scale.
>
> What I would like to be able to do is:
> 1.  Plot with GFX functions to a layer above all other layers
> (Foreground) and a layer below all other layers and the chart layer
> (Background).
> 2.  GFX plots to each layer should remember their plots between AFL
> passes and only clear a layer when plotting first time again in a new
> AFL pass.
> 3.  GFX plots should not cause the chart plots to clear.
>
> Why would I like these?
> First, I currently generate some informational cell and button plots
> with GFX functions.  I can plot them above the chart, but not above
> the other layers that have my tend lines, etc.  This creates problems
> reading the text in the cell or button, and potential problems
> selecting line elements running over the buttons.  Even if future
> versions of AB allow more control over the chart area so there is more
> room for these informational displays, the regular layers still
> currently cover more than the chart plot area.  Herman has shown us
> how to create essentially pull down buttons running along the top of
> the chart.  These buttons need to be plotted above everything else for
> a clean interface.
>
> Second, I can speed up my AFL processing (and I do a lot of
> processing), if I am able to only recalculate (and re-plot) on a new
> bar (re-plotting the last bar only in a GFX layer).  However, I still
> want to plot and interact with the GFX layer buttons in the mean time.
>
> Plotting order for normal chart plots:
>
> Something that is on the AB to do list is having more direct control
> over the plot order in charts.  The difficulties of this have been
> discussed before on this list.  One possible strategy is to extend
> this idea of the GFX plot layers to a more general case.  For instance
> if there were 8 or 16 layers that could be specified for the target of
> a plot.  Within a layer, the plots would operate the same as currently
> is the case.  However, selecting a different layer would result in the
> ability to plot above or below a previous plot command without regard
> to its placement in the AFL formula.
>
> One AFL command could serve for selecting the plot layer for
> subsequent plot or GFX commands (internally they do not have to be the
> same layer).  For example:  PlotLayer(5); Plot(...);
>
> The nice thing about this approach is that it would be completely
> backwards compatible with the default layer.
>
> Please offer your insights.
> Can you think of other uses for this approach?
> Do you have a different approach that would work?
>
> Best regards,
> Dennis
>

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

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/