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

Notification

Icon
Error

Options
Go to last post Go to first unread
ItalMeta  
#1 Posted : Thursday, March 3, 2016 11:40:56 AM(UTC)
ItalMeta

Rank: Newbie

Groups: Registered Users, Subscribers
Joined: 3/3/2016(UTC)
Posts: 3

Hello everybody,

I would like to plot the high and the low of the last three days in a 5 minutes chart.

And, if possible, create a colored area among them.

Can you help me, please?

Thank you in advance.

mstt  
#2 Posted : Thursday, March 3, 2016 8:40:16 PM(UTC)
mstt

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 ItalMeta The combination of two "Multi-Frame" formulas should provide HIGH and LOW for the last 3 days of any chart from 1 minute through to daily periodicity. Creating a colored area between the two plots might be a little more difficult. The timing modules for all six series of Multi-Frame indicators are proprietary so a portion of each formula is withheld. However I can supply you with complete formulas if you provide me with an email address via a private message or an email to rlarsen@quik.co.nz. These formulas use the newer version (188 KB) of the Forum DLL, and it must be named Forum.DLL for the formulas to work. Roy {Multi-Frame D+ LLV} {Lowest Low Value} {Uses Equis Forum DLL} {Roy Larsen, 2011-2016, 3/3/16} {User settings} N:=Input("Multi-Frame D+ LLV, Lookback Periods",1,26,3); U:=Input("Price, 1=O 2=H 3=L 4=C 5=MP 6=WC 7=Typ",1,7,3); J:=Input("Months/Frame, 0=Weekly 5=Bi-weekly 10=Daily",10,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} {code withheld} {Frame prices} Q:=ValueWhen(1,M OR Z=1,O); Q:=ValueWhen(1,J,If(J=1,Q,ValueWhen(2-G,1,Q))); B:=HighestSince(1,M OR Z=1,H); B:=ValueWhen(1,J,If(J=1,B,ValueWhen(2-G,1,B))); Y:=LowestSince(1,M OR Z=1,L); 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))); A:=(B+Y)/2; D:=(B+Y+2*K)/4; K:=If(U=1,Q,If(U=2,B,If(U=3,Y,If(U=5,A, If(U=6,D,If(U=7,(B+Y+K)/3,K)))))); LowestSince(N,J,K); {Multi-Frame D+ HHV} {Highest High Value} {Uses Equis Forum DLL} {Roy Larsen, 2011-2016, 3/1/16} {User settings} N:=Input("Multi-Frame D+ HHV, Lookback Periods",1,26,3); U:=Input("Price, 1=O 2=H 3=L 4=C 5=MP 6=WC 7=Typ",1,7,2); 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} {code withheld} {Frame prices} Q:=ValueWhen(1,M OR Z=1,O); Q:=ValueWhen(1,J,If(J=1,Q,ValueWhen(2-G,1,Q))); B:=HighestSince(1,M OR Z=1,H); B:=ValueWhen(1,J,If(J=1,B,ValueWhen(2-G,1,B))); Y:=LowestSince(1,M OR Z=1,L); 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))); A:=(B+Y)/2; D:=(B+Y+2*K)/4; K:=If(U=1,Q,If(U=2,B,If(U=3,Y,If(U=5,A, If(U=6,D,If(U=7,(B+Y+K)/3,K)))))); HighestSince(N,J,K);
thanks 1 user thanked mstt for this useful post.
MS Support on 3/4/2016(UTC)
mstt  
#3 Posted : Friday, March 4, 2016 12:42:17 AM(UTC)
mstt

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)
Then again, something as simple as this might do the trick. The change from one day to the next can be signaled on intraday charts by noting when a new Dayofweek() returns a different value from the previous bar. Roy {3-Day Extreme Prices} D:=DayOfWeek(); D:=D<>Ref(D,-1); HighestSince(3,D,H); LowestSince(3,D,L);
ItalMeta  
#4 Posted : Friday, March 4, 2016 8:22:38 AM(UTC)
ItalMeta

Rank: Newbie

Groups: Registered Users, Subscribers
Joined: 3/3/2016(UTC)
Posts: 3

Originally Posted by: mstt Go to Quoted Post

Then again, something as simple as this might do the trick. The change from one day to the next can be signaled on intraday charts by noting when a new Dayofweek() returns a different value from the previous bar.

Roy

{3-Day Extreme Prices}
D:=DayOfWeek();
D:=D<>Ref(D,-1);
HighestSince(3,D,H);

LowestSince(3,D,L);

 

Hello Roy,

thank you very much for your kind response... certainly I expressed myself badly...

I'm searching for the high and the low of each of the last 3 days, and not the highest high and the lowest low...

 
mstt  
#5 Posted : Friday, March 4, 2016 9:11:48 AM(UTC)
mstt

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 ItalMeta OK, my mistake. Multi-Frame formulas can separately plot the HIGH and LOW of each day. If necessary the two formulas can quite easily be condensed into one formula and then changing the user options via the Input() functions. Normally a Multi-Frame formula will plot as many days (or hours or weeks etc.) as is possible. For example an Multi-Frame 5-day Simple Moving Average will not plot for the first 4 days but then plots for all remaining days. However it wouldn't be hard limit daily HHV and LLV to just the last 3 days of a 5-minute or any other chart periodicity. The same result can also be applied to 10, 15 20, 30 etc. and more chart periodicities. I'm not going to post the full code for any Multi-Frame formula but I will create a formula specifically to do what you want. However, I need an email address so I can send the formula to you. Modifying the simple code might give you what you ask for but it would not be very flexible. On the other hand a Multi-Frame formula gives the user a number of options. Roy
ItalMeta  
#6 Posted : Friday, March 4, 2016 9:39:20 AM(UTC)
ItalMeta

Rank: Newbie

Groups: Registered Users, Subscribers
Joined: 3/3/2016(UTC)
Posts: 3

Thank you very much again, for your availability I've just sent you a private message. Ore
mstt  
#7 Posted : Sunday, March 6, 2016 2:33:41 AM(UTC)
mstt

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 ore Here's an untested alternative to the Multi-Frame version I emailed to you. Roy {Daily HHV & LLV Results} N:=Input("Plot last N daily values",1,999,3); D:=DayOfWeek(); D:=D<>Ref(D,-1); Q:=LastValue(Cum(D>0)); B:=HighestSince(1,D,H); Y:=LowestSince(1,D,L); ValueWhen(1,(Q-N)<Cum(D),B); ValueWhen(1,(Q-N)<Cum(D),Y);
Users browsing this topic
Guest (Hidden)
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.