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

[amibroker] Date Marks in Price plot



PureBytes Links

Trading Reference Links




Yuki got me thinking about a few simple lines of code that I 
included in the built-in Price plot.
 
Often, I like to see exactly where months and weeks begin, and 
since AB doesn't have them, I put them in.
 
The gray marks are the first trading day of the week, usually 
Mondays, except for Monday holidays then its a Tuesday.
The dark red marks are the first trading day of the 
month.
 
I put the code in the Price plot at the top. Adjust colors and 
line sizes (numbers at end of PLOT statements) at will.
 
-CS
 
<IMG alt="" hspace=0 src="png00052.png" 
align=baseline border=0>
 

Plot(<FONT face=Verdana 
color=#8b0000 size=2>IIf(<FONT 
face=Verdana color=#8b0000 size=2>Month<FONT face=Verdana 
size=2>()!=Ref<FONT 
face=Verdana size=2>(<FONT face=Verdana color=#8b0000 
size=2>Month(),-<FONT 
face=Verdana color=#800080 size=2>1<FONT face=Verdana 
size=2>),1<FONT 
face=Verdana size=2>,<FONT face=Verdana color=#800080 
size=2>0),<FONT face=Verdana 
color=#00008b size=2>"",<FONT 
face=Verdana color=#800080 size=2>24<FONT face=Verdana 
size=2>,<FONT face=Verdana color=#ff0000 
size=2>styleHistogram|<FONT 
face=Verdana color=#ff0000 size=2>styleOwnScale<FONT face=Verdana 
size=2>|<FONT face=Verdana color=#ff0000 
size=2>styleNoLabel,<FONT 
face=Verdana color=#800080 size=2>0<FONT face=Verdana 
size=2>,7<FONT 
face=Verdana size=2>);
Plot(<FONT face=Verdana 
color=#8b0000 size=2>IIf(<FONT 
face=Verdana color=#8b0000 size=2>DayOfWeek<FONT face=Verdana 
size=2>()<<FONT face=Verdana color=#8b0000 
size=2>Ref(<FONT face=Verdana 
color=#8b0000 size=2>DayOfWeek<FONT face=Verdana 
size=2>(),-1<FONT 
face=Verdana size=2>),<FONT face=Verdana color=#800080 
size=2>1,<FONT face=Verdana 
color=#800080 size=2>0),"",<FONT 
face=Verdana color=#800080 size=2>39<FONT face=Verdana 
size=2>,<FONT face=Verdana color=#ff0000 
size=2>styleHistogram|<FONT 
face=Verdana color=#ff0000 size=2>styleOwnScale<FONT face=Verdana 
size=2>|<FONT face=Verdana color=#ff0000 
size=2>styleNoLabel,-<FONT 
face=Verdana color=#800080 size=2>0.55<FONT face=Verdana 
size=2>,14<FONT 
face=Verdana size=2>);
//--Indicator-End--<FONT 
face=Verdana color=#008000 size=2>
// Above line instructs the parser that the code
// below is only for commentary/interpretation window
// This provides significant performance improvement
//
// (C)2002 amibroker.com
Rest of 
code...............






Yahoo! Groups Sponsor


  ADVERTISEMENT  









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.


Attachment: Description: ""