Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi woodsy
This indicator was initially designed to plot longer periods than daily but it's also capable of daily and higher time frames as required. There are 6 Multi-Frame indicator ranges with approximately 150 formulas in each range. If you don't already have the Forum DLL it is available from the files section of this website and must be named as used in the indicator.
Hope this helps.
Roy
{Multi-Frame D+ OHLC}
{Uses Equis Forum DLL}
{Roy Larsen, 2008-2014, 3/1/14}
{User settings}
N:=Input("Multi-Frame D+ OHLC, 0=All 1=O 2=H 3=L 4=C",0,4,4);
J:=Input("Months/Frame, 0=Weekly 5=Bi-weekly 10=Daily",0,12,10);
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,0);
G:=Input("End-of-Frame Offset in Days, 0-13",0,13,0);
{D+ Timing}
{Day counter by metastock@wabbit.com.au}
J:=If(J<6 OR J=10 OR Mod(J,3)=0 AND (J<>9),Int(J),-1);
M:=Month(); A:=Int((14-M)/12); D:=DayOfMonth();
Y:=Year(); X:=Y+4800-A; B:=M+(12*A)-3;
Z:=Cum(1); M:=If(Mod(J,5)=0,D+Int((2+153*B)/5)+
(365*X)+Int(X/4)-Int(X/100)+Int(X/400)-32045-G,
(Y-ValueWhen(1,Z=1,Y))*12+M);
I:=If(J=0,Int(M/7),If(J=5,Int(M/14),If(J=10,M,
Int((M-1)/Max(1,J))))); I:=I>ValueWhen(2,1,I);
G:=LastValue(J<0 OR Lowest(Sum(I>0,5))=5);
I:=ExtFml("Forum.Sum",If(Z=1,1,I),1);M:=G+I;
F:=ExtFml("Forum.Sum",Ref(I,1),1)*(M=0)*(Z>1)+G;
B:=LastValue(Z);A:=B-1=Z;B:=B=Z;F:=F+B*(Q=0)
*(DayOfWeek()=5)*(J=0)*(Highest(Hour())=0);
J:=If(F,1,(Alert(F,2)=0)*M*2*(Z>1));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2,M*2,J));
{Frame prices}
Q:=ValueWhen(1,M+(Z=1),O);
B:=HighestSince(1,M+(Z=1),H);
Y:=LowestSince(1,M+(Z=1),L);
Q:=ValueWhen(1,J,If(J=1,Q,ValueWhen(2-G,1,Q)));
B:=ValueWhen(1,J,If(J=1,B,ValueWhen(2-G,1,B)));
Y:=ValueWhen(1,J,If(J=1,Y,ValueWhen(2-G,1,Y)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
{Outputs}
ValueWhen(1,N=0,Q);
ValueWhen(1,N=0,B);
ValueWhen(1,N=0,Y);
If(N=1,Q,If(N=2,B,If(N=3,Y,K)));
|
1 user thanked mstt for this useful post.
|
|