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

[amibroker] Date Marks ver 2



PureBytes Links

Trading Reference Links




AmiAddicts,
 
I did a few updates to the little formula that I use to show 
date marks at the bottom of my main price plots.
I included handling for weekly and monthly EOD charts. It 
still requires opening the PARAMETERS box and tweaking the controls since max 
and min don't seem able to anchor the marks at a constant location when the 
window is zoomed. I have windows for all 3 time frames open at one time and 
changing the parameters for one won't change the parameters in another, so it 
won't mess up your other windows.
-CS
 
 <FONT 
size=2>
<FONT face=Tahoma 
color=#0000ff>Min1=<FONT 
color=#0000ff>Param("Long 
Span Min",-0.5<FONT 
size=2>,-5,<FONT 
size=2>10,<FONT 
size=2>0.5<FONT face=Tahoma 
color=#0000ff>);
<FONT face=Tahoma 
color=#0000ff>Min2=<FONT 
color=#0000ff>Param("Short 
Span Min",-1<FONT 
size=2>,-5,<FONT 
size=2>10,<FONT 
size=2>0.5<FONT face=Tahoma 
color=#0000ff>);
<FONT face=Tahoma 
color=#0000ff>Max1=<FONT 
color=#0000ff>Param("Long 
Span Max",7<FONT 
size=2>,0,<FONT 
size=2>10,<FONT 
size=2>0.5<FONT face=Tahoma 
color=#0000ff>);
<FONT face=Tahoma 
color=#0000ff>Max2=<FONT 
color=#0000ff>Param("Short 
Span Max",15<FONT 
size=2>,0,<FONT 
size=2>100,0.5<FONT face=Verdana 
size=2>);
 
<FONT color=#0000ff 
size=2>M1=IIf(Year()!=Ref(Year(),-1),1,0);M2=Null; //Put anything 
here that you 
wantW1=IIf(Year()!=Ref(Year(),-1),1,0);W2=IIf(Month()!=Ref(Month(),-1),1,0);D1=IIf(Month()!=Ref(Month(),-1),1,0);D2=IIf(DayOfWeek()<Ref(DayOfWeek(),-1) 
,1,0);
 
<FONT color=#0000ff 
size=2>INV=Interval();A1=IIf(INV==86400,D1,IIf(INV==432000,W1,IIf(INV==2160000,M1,Null)));A2=IIf(INV==86400,D2,IIf(INV==432000,W2,IIf(INV==2160000,M2,Null)));
 
<FONT color=#0000ff 
size=2>Plot(A1,"",24,styleHistogram|styleOwnScale|styleNoLabel,Min1,Max1);Plot(A2,"",39,styleHistogram|styleOwnScale|styleNoLabel,Min2,Max2);
 

//--Indicator-End--






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.