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

[amibroker] Re: Visible bars



PureBytes Links

Trading Reference Links

William, Gary - forgive me for interjecting, but was finishing up a 
post and saw this.  Try -

HighestVisible = LastValue(Highest(IIf(BarVisible,V,0))); 

I think that what you need a scalar that is the highest bar visible.  
What you were getting before was a vector which in turn made AdjVol a 
vector.


--- In amibroker@xxxxxxxxxxxxxxx, "William Peters" 
<williampeters@xxxx> wrote:
> Gary,
> 
> Your example is not quite what I'm after. I'd like to have the 
volume
> figures in the right axis displayed in (1000's) if the highest 
visible
> volume bar is greater than 999999 otherwise display as straight 
volume.
> 
> [Gary wrote]
> "The problem with the code below is that once HigestVisible > 
999999 then
> all the following bars that are visible get divided by 1000, too."
> 
> Well that would be fine if only the preceding visible bars (bars to 
the
> left) were also divided by 1000.
> 
> I'd like to crack this if its at all possible.
> Thanks again,
> William Peters
> www.amitools.com
> 
> -----Original Message-----
> From: Gary A. Serkhoshian [mailto:serkhoshian777@x...]
> Sent: Sunday November 16, 2003 12:17 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Visible bars
> 
> 
> William,
> 
> The problem with the code below is that once HigestVisible > 999999 
then all
> the following bars that are visible get divided by 1000, too.  If 
you look
> at the histogram this gives you a graph that is unreadable.
> 
> If you are just trying to make the larger volume number more 
readable just
> use the following code, and thanks by the way for bringing up the
> barsvisible question which I needed to get my arms around.
> 
> Code below.
> 
> Regards,
> Gary
> 
> AdjVol = IIf(V > 999999, V/1000,V);
> 
> Needadj = V > 999999;
> 
> Plot(V,"Volume",colorBrightGreen,styleHistogram+styleThick);
> 
> Title = "Volume: " + NumToStr(AdjVol,5.0) + " " + WriteIf
(Needadj,"(x
> 1000)","");
> 
> 
> 
> William Peters <williampeters@xxxx> wrote:
>   Thanks Gary and Herman,
> 
>   Below is my attempt at a custom volume indicator the intended 
function of
> which is quite simply as follows:
>   If there are any visible volume bars over 999999 then format ALL 
visible
> volume bars as V/1000 otherwise leave as V.
> 
>   At the moment it doesn't work correctly when you scroll to the 
far right
> of a chart. Any insights appreciated.
> 
>   BarVisible = Status( "barvisible" );
>   HighestVisible = Highest(IIf(BarVisible,V,0));
> 
>   /* If the highest visible volume bar is greater then 999999 then 
volume
> should be expressed as V/1000 otherwise express volume as V */
>   AdjVol = IIf(HighestVisible > 999999,V/1000,V);
> 
>   TitleText = WriteIf(HighestVisible > 999999, " ( x1000 )", "" );
>   Title = "Volume: " + WriteVal(AdjVol , 1.0) + TitleText;
>   Plot( AdjVol , "Vol", colorCustom4, styleHistogram + styleThick );
> 
>   Many thanks,
>   William Peters
>   www.amitools.com
> 
>   -----Original Message-----
>   From: Gary A. Serkhoshian [mailto:serkhoshian777@x...]
>   Sent: Saturday November 15, 2003 7:12 PM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: Re: [amibroker] Visible bars
> 
> 
>   Hi William,
> 
>   Try this:
> 
>   Highest(IIf(Status("barvisible"),H,0));
>   Regards,
> 
>   Gary
> 
> 
> 
>   William Peters <williampeters@xxxx> wrote:
>     Hello,
> 
>     I'm writing an indicator script that needs to take into account 
only the
> visible bars in the chart pane. So for example I may need to 
determine the
> HHV of the visible bars.
>     I'm sure someone wrote an indicator which was using a similar 
procedure
> some time ago but can't locate it. Any help/suggestions much 
appreciated.
> 
>     Many thanks,
>     William Peters
>     www.amitools.com
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> 
> 
> 
> --------------------------------------------------------------------
--------
> ----
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
>       Yahoo! Groups Sponsor
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/