PureBytes Links
Trading Reference Links
|
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@xxxxxxxxxxxx> 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<FONT
color=#000000>,V/1000,V); TitleText = WriteIf(HighestVisible > 999999, " ( x1000 )", "" ); Title = "Volume: " + WriteVal(AdjVol , 1.0) + TitleText; Plot(
AdjVol , "Vol", colorCustom4, styleHistogram + styleThick );
Many thanks,William Peterswww.amitools.com
-----Original Message-----From: Gary A. Serkhoshian [mailto:serkhoshian777@xxxxxxxxx]Sent: Saturday November 15, 2003 7:12 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] Visible bars
Hi William,
Try this:
Highest(IIf(Status("barvisible"),H,0));
Regards,
Gary
William Peters <williampeters@xxxxxxxxxxxx> 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 Peterswww.amitools.comSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend 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 the Yahoo! Terms of Service.
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Yahoo! Groups Sponsor
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 the Yahoo! Terms of Service.
|