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

[amibroker] Re: matching grid to syleOwnScale



PureBytes Links

Trading Reference Links

Great idea that should be in the knowledge base. 

Seede

--- In amibroker@xxxxxxxxxxxxxxx, "inertia_trader" 
<inertia_trader@xxx> wrote:
>
> --- In amibroker@xxxxxxxxxxxxxxx, Esteban <EstebanUno@> wrote:
> > keep perspective by using a constant scale... For example in a
> > tight range I don't want bars using the whole plot area, but would
> > like to keep it confined to an area of the plot that keeps the
> > range in perspective to the rest of the chart that is not in view.
> 
> Ahh, now I understand exactly what you are saying.  There's a trick
> I've used in the past to programatically set a minimum range for
> the y-axis.  If, for example, I want a minimum y-axis range of -10
> to +10, even if the data are much smaller, I can do the following:
> 
> backgroundColor = <fillInYourBackgroundColorHere>;
> dummyHigh = 10;
> dummyLow = -10;
> plot(myData, "Data I Want To See", colorBlue, styleBar|styleThick);
> plot(dummyHigh, "", backgroundColor);  // invisible plot
> plot(dummyLow,  "", backgroundColor);  // invisible plot
> 
> Of course, if some values of myData exceed +/-10, the axis will
> expand according.  If you wanted an absolutely fixed axis over
> all timeframes, you could set
>   dummyHigh = lastValue(highest(myData));  and
>   dummyLow  = lastValue(lowest(myData));
> 
> 
> Tom
> 
>  
> > On 6/21/07, inertia_trader <inertia_trader@> wrote:
> > >
> > >   Esteban, the purpose of styleOwnScale is to decouple your 
plot's
> > > scaling from the y axis. You seem to want the plot and axis
> > > coupled together, if I understand you correctly. Therefore the
> > > obvious answer would be not to use styleOwnScale. You might be
> > > better off simply applying min() and max() to the actual data
> > > you're plotting if there are values below which and above which
> > > you don't want to see.
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>,
> "Esteban"
> > > <EstebanUno@> wrote:
> > > >
> > > > How can I match the y axis scale grid to the styleOwnScale 
minimum
> > > > and maximum values in my code?
> > > >
> > > > minScl = param("min scale",6,0,10,1);
> > > > maxScl= param("max scale",12,7,16,1);
> > > > PlotForeign("Sym","Example", colorBlue, styleBar | styleThick 
|
> > > > styleOwnScale, minScl, maxScl);
> > > >
> > > > I know I can do it manually in the parameters > axes & grid 
tab by
> > > > choosing custom then setting the values for min and maximum. 
Gets
> > > > to be a hassle having to change this each time I change a 
scaling
> > > > parameter in the parameters tab. Even worse is that the actual
> > > > parameters I use only change inputs that calculate the scale. 
So I
> > > > have to calculate manually to make changes in the axes & grid 
tab.
> > > >
> > > > Any ideas?
> > > >
> > >
> > > 
> > >
> >
>




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/