logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Woodsy26ca  
#1 Posted : Tuesday, July 24, 2018 4:23:42 PM(UTC)
Woodsy26ca

Rank: Newbie

Groups: Registered Users, Subscribers, Unverified Users
Joined: 12/1/2016(UTC)
Posts: 2

Hello,

Does anyone have an indicator that plots an instrument's weekly ATR on a daily chart?

mstt  
#2 Posted : Tuesday, July 24, 2018 11:06:32 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,041

Was thanked: 57 time(s) in 54 post(s)
Hi Woodsy My Multi-Frame indicators can be set to whatever higher periodicity that's required. There are 6 different groups of indicators and each group has around 150 formulas. Email me at roy.larsen@gmail.com and I'll try to get the appropriate formulas and associated DLLs to you. Roy
mstt  
#3 Posted : Thursday, July 26, 2018 1:15:56 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,041

Was thanked: 57 time(s) in 54 post(s)
Hi Woodsy The formula below should meet your requirements. Be aware that there are two DLLs that you need for this formula. They are the Forum and MSTT DLLs. The Forum DLL should be available from the MetaStock forum, and the MSTT DLL is available from me. Not sure that an email attachment will work for DLL or ZIP formats. In posting this code I'm worried about MetaStock ignoring end-of-line breaks. Nevertheless it shouldn't take more than a few minutes to separate back to individual lines of code (semicolon indicates end-of-line) if the problem occurs. Roy {Multi-Frame D+ ATR} {Average True Range} {MSTT DLL by wabbit.com.au} {Also uses Equis Forum DLL} {Roy Larsen, 2011-2014, 3/1/14} {User settings} N:=Input("Multi-Frame D+ ATR, Periods",1,99,10); J:=Input("Months/Frame, 0=Weekly 5=Bi-weekly 10=Daily",0,12,0); 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} B:=HighestSince(1,M+(Z=1),H); Y:=LowestSince(1,M+(Z=1),L); 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))); Ki:=ValueWhen(2,J,K); J:=J>0; I:=Cum(J); {ATR} K:=ExtFml("Forum.SUM",Max(Abs(Ki-Y),Abs(Ki-B)),1); K:=Max(K,B-Y); M:=Cum(J*K)/Min(I,N); K:=If(I<N,M,K); R:=If(J,If(I<N,1,2*N-1),-1); A:=ExtFml("MSTT.EMA",K,R); ValueWhen(1,N<=I,A);
MS Support  
#4 Posted : Thursday, July 26, 2018 10:03:28 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,457

Thanks: 39 times
Was thanked: 120 time(s) in 116 post(s)

Here's another attempt at formatting, thanks Roy for assisting!

Code:
 {Multi-Frame D+ ATR}
 {Average True Range}
 {MSTT DLL by wabbit.com.au}
 {Also uses Equis Forum DLL}
 {Roy Larsen, 2011-2014, 3/1/14}

 {User settings} N:=Input("Multi-Frame D+ ATR,  Periods",1,99,10); J:=Input("Months/Frame,  0=Weekly  5=Bi-weekly  10=Daily",0,12,0); 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} B:=HighestSince(1,M+(Z=1),H); Y:=LowestSince(1,M+(Z=1),L); 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))); Ki:=ValueWhen(2,J,K); J:=J>0; I:=Cum(J);

 {ATR} K:=ExtFml("Forum.SUM",Max(Abs(Ki-Y),Abs(Ki-B)),1); K:=Max(K,B-Y); M:=Cum(J*K)/Min(I,N); K:=If(I<N,M,K); R:=If(J,If(I<N,1,2*N-1),-1); A:=ExtFml("MSTT.EMA",K,R); ValueWhen(1,N<=I,A);

Users browsing this topic
Similar Topics
June 2016: ATR Breakout Entries (2016)
by MS Support 7/28/2017 9:54:37 PM(UTC)
Top 3 Reasons behind the Popularity of MetaTrader 4 (3rd Party Advertisements)
by sandysr 3/9/2017 6:56:21 AM(UTC)
Guys, it is possible to open the database of MetaTrader 5 in MetaStock? How to make? (MetaStock)
by Rafael 7/17/2016 5:51:00 PM(UTC)
Does anyone know 'Trend magic indicator' CCI:50 and ATR:5 (Formula Assistance)
by Srdkn 8/30/2015 5:53:10 PM(UTC)
Does the ATR formula use Wilders smoothing, or is it an SMA calculation? (MetaStock)
by PTJim 8/21/2014 11:27:23 AM(UTC)
ATR Long Target based on today (Formula Assistance)
by hughes1970 9/16/2013 1:36:34 PM(UTC)
supper trend ATR (Formula Assistance)
by kaushik1 8/15/2013 1:09:59 AM(UTC)
Please Help me ! for ATR trailing stop in indicator builder convert for expert advisor or system tester (Formula Assistance)
by petouchbaby 3/13/2013 2:28:34 AM(UTC)
ATR Trailing stop: Is it simple ATR or exponential ATR (Formula Assistance)
by arrowcap 11/27/2012 12:36:35 AM(UTC)
System Sell order based on ATR (Basic Coding Techniques)
by trab 10/30/2012 10:03:51 PM(UTC)
How do I combine these two in experts C>Mov(C,36,E) (condition 1) & C <(HHV(H,20)+2*ATR(10) (condition 2) (Formula Assistance)
by Sctty268 3/8/2012 8:08:01 PM(UTC)
Long with 3 day ATR (Formula Assistance)
by NiallL 2/27/2012 2:17:57 PM(UTC)
Modify ATR to show as 'inverted percentage of price' (MetaStock)
by mickl 2/8/2012 12:32:33 AM(UTC)
Real time data from metatrader to metastock (MetaStock)
by Carbonmimeti 12/21/2011 12:49:29 AM(UTC)
Unable to plot RAD chandelier ATR stop (Formula Assistance)
by paddington 11/28/2011 2:58:37 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.