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

[amibroker] GFX and Plotting in Layers in AB



PureBytes Links

Trading Reference Links

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/