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

RE: [amibroker] Re: Graph paper background



PureBytes Links

Trading Reference Links

This is a modulus and comparing to 0 is just the REMAINDER portion so we
get TRUE on every 5th bar.

However, I can see when the condition is NOT True it will attempt to
plot 0 (False). Can this be done for your Log graphs?

Plot(IIf((BarIndex() % 5) == 0,1,Null),...
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Graham
Sent: Thursday, November 17, 2005 16:35
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Graph paper background

For vertical lines it is best to not use zero because for log scales
you will not get a full line covering the chart height as there is no
log of zero

Plot((BarIndex() % 5) == 0,"",colorGrey50,styleHistogram |
styleOwnScale, 0.1,1);

On 11/18/05, Terry <MagicTH@xxxxxxxxxxx> wrote:
> Here is a complete "Graph Paper" solution that self-adjusts for
> selected symbol and number of bars viewed. I have made it an Include
> file for my use. (Watch for line wraps.)
>
> //Vertical lines:
>
> bars = LastValue(Cum(Status("barvisible")));
> Vbars = round(bars/15 + 0.5);
> Plot(BarIndex() % vbars == 0,"",colorGrey50,styleHistogram |
> styleOwnScale, 0,1);
>
> //Horizontal lines:
>
> Highshowing = LastValue(BarsSince(Status("barvisible")));
> Lowend = LastValue(Ref(LLV(L,bars),-Highshowing));
> Highend = LastValue(Ref(HHV(H,bars),-Highshowing));
> ink = (Highend - Lowend) / 10;
> printf("\n\nbars %1.0f, low %1.0f, high %1.0f, highest vis %1.0f, inc
> %1.2f",bars,Lowend,Highend,Highshowing,ink );
> for (x = Lowend - ink; x <= Highend + ink; x = x + ink) //Adjust range
> and increments as needed
> Plot(x,"",colorGrey50,styleNoRescale | styleNoLabel);
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> >
> > I knew modulus was somewhere...just couldn't find it in HELP! As b
> > mentioned, HELP is nice if you know what you want! For example, try
to
> > find "user-defined function" using search. Can't do it.
> >
> > Anyhow, thanks for the simplification.
> > --
> > Terry
> >
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On
> > Behalf Of scourt2000
> > Sent: Thursday, November 17, 2005 11:09
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Graph paper background
> >
> >
> > Terry, it's more efficient to code it up like this:
> >
> > Plot((BarIndex() % 5) == 0,"",colorGrey50,styleHistogram |
> > styleOwnScale, 0,1);
> >
> > Use the mod (%) operator in preference to division whenever you
> > can.  Of course, the parens are extraneous since the operator
> > precedence would parse the expression the same, but it saves a bug
> > later if the expression became more complicated (i.e. using OR's and
> > AND's with and missing a paren combo to group the OR's correctly).
> >
> > Steve
>
>
>
>
>
>
>
> 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 other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm



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

 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/