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

Re: [amibroker] Re: BuyPrice/ShortPrice Problem



PureBytes Links

Trading Reference Links

Help!
   Im trying to find the Highest High in the last 50 days then display a 
vertical line
at it's position.
The results I am getting don't seem to make sense. ie multiple vertical 
lines in the wrong places.

Also, scrolling or selecting bars changes the results for some reason.....?

Please HELP!

Here is the code:
// Find BarNumber for highest bar in Last 50 Bars.
//
//
Color = IIf(O > C, colorBlack, colorYellow);
Plot( Close, "Price", color, styleCandle );

BC=BarCount-1;
LastPeek = HHVBars(High,50);
LastPeekBar = BC-LastPeek;

//Plot Vertical line 50 bars back
VLine = IIf((BC-50)==BarIndex(),1,0);
         Plot (VLine ,"DateBar", colorBlue, styleHistogram | 
styleOwnScale,0,1);

//Plot Vertical line @ HighestHighBar within last 50 bars.
VLine = IIf(LastPeekBar==BarIndex(),1,0);
         Plot (VLine ,"DateBar", colorGreen, styleHistogram | 
styleOwnScale,0,1);

_N(Title = "\\c29"+
"Highest Bar x50 "+
"\\c32"+ Date()+
"\\c38 LastPeekBar \\c24"+LastPeekBar+
"\\c38 BarSelected \\c24"+BarIndex()+

"");








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