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

RE: [amibroker] Visible bars



PureBytes Links

Trading Reference Links




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.
<FONT 
size=2> 
I'd like to crack this if its 
at all possible.

Thanks again,William 
Peters<FONT 
size=2>www.amitools.com
<FONT face=Tahoma 
size=2>-----Original Message-----From: Gary A. Serkhoshian 
[mailto:serkhoshian777@xxxxxxxxx]Sent: Sunday November 16, 2003 12:17 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 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<FONT 
size=2>,V);
Needadj = V > 999999<FONT 
size=2>;
Plot(V,<FONT color=#ff00ff 
size=2>"Volume"<FONT 
size=2>,colorBrightGreen,styleHistogram+styleThick);
Title = "Volume: " 
+ NumToStr<FONT face=Arial 
size=2>(AdjVol,<FONT 
face=Arial color=#ff00ff size=2>5.0)<FONT 
size=2> + " " + 
WriteIf<FONT 
size=2>(Needadj,"(x 1000)"<FONT 
size=2>,""<FONT 
size=2>);William Peters 
<williampeters@xxxxxxxxxxxx> wrote:
<BLOCKQUOTE class=replbq 
>
  
  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.
   
  <FONT 
  size=2>BarVisible = Status( 
  "barvisible"<FONT 
  face="Courier New"> ); HighestVisible = 
  Highest(<FONT 
  color=#0000ff>IIf(BarVisible,<FONT 
  color=#000000>V,<FONT 
  color=#ff00ff>0<FONT 
  size=2>)); /* If the 
  highest visible volume bar is greater then 999999 then volume should be 
  expressed as V/1000 otherwise express volume as V */<FONT 
  face="Courier New"> AdjVol = <FONT 
  color=#0000ff>IIf(HighestVisible > <FONT 
  color=#ff00ff>999999,<FONT 
  color=#000000>V/<FONT 
  color=#ff00ff>1000,<FONT 
  color=#000000>V<FONT 
  size=2>); TitleText = <FONT 
  color=#0000ff>WriteIf(HighestVisible > 
  999999, <FONT 
  color=#ff00ff>" ( x1000 )", <FONT 
  color=#ff00ff>""<FONT 
  size=2> ); <FONT 
  color=#000000>Title = <FONT 
  color=#ff00ff>"Volume: " + <FONT 
  color=#0000ff>WriteVal(AdjVol , <FONT 
  color=#ff00ff>1.0<FONT 
  size=2>) + TitleText; <FONT 
  color=#0000ff>Plot( AdjVol , <FONT 
  color=#ff00ff>"Vol", colorCustom4, styleHistogram + 
  styleThick ); 
   
  
  Many thanks,William 
  Peters<FONT 
  size=2>www.amitools.com
  <FONT face=Tahoma 
  size=2>-----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<FONT face=Arial 
  size=2>(IIf<FONT 
  face=Arial size=2>(<FONT face=Arial color=#0000ff 
  size=2>Status(<FONT face=Arial 
  color=#ff00ff size=2>"barvisible"<FONT face=Arial 
  size=2>),H,0<FONT 
  face=Arial size=2>));
  
  Regards,
  Gary
  William Peters <williampeters@xxxxxxxxxxxx> 
  wrote:
  <BLOCKQUOTE class=replbq 
  >
    
    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<A 
    href="">www.amitools.comSend 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 



Do you Yahoo!?Protect your 
identity with Yahoo! Mail AddressGuard Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.