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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
JKrider  
#1 Posted : Tuesday, May 3, 2005 9:02:48 PM(UTC)
JKrider

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/17/2005(UTC)
Posts: 9
Location: Apple Valley, CA

If working with a one minute chart, can i plot a pivot and s/r lines based on the prior days (not minutes) High/Low/close? I'm surprised i cannot find anything on daily pivots that can be ploted on any time scale. JK
Jose  
#2 Posted : Wednesday, May 4, 2005 8:43:12 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
JK, take a look at the MS code for intraday pivot levels found here: http://www.metastocktools.com/MACDH/Forex.htm jose '-) http://www.metastocktools.com
joetrade69  
#3 Posted : Wednesday, May 4, 2005 6:16:57 PM(UTC)
joetrade69

Rank: Advanced Member

Groups: Registered, Registered Users, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 121

Here's a version of the formula: {daily pivot on intraday bars} ic:=ValueWhen(1,ROC(DayOfWeek(),1,$)<>0,Ref(C,-1)); ih:=ValueWhen(1,ROC(Hour(),1,%)<0,HighestSince(2,ROC(Hour(),1,%)<0,Ref (H,-1))); il:=ValueWhen(1,ROC(Hour(),1,%)<0,LowestSince(2,ROC(Hour(),1,%)<0,Ref (L,-1))); mp1:=(ih+il+ic)/3; r2:=mp1+(ih-il); r1:=(mp1*2)-il; s1:=(mp1*2)-ih; s2:=mp1-(r1-s1); r1; r2; s1; s2;
JKrider  
#4 Posted : Wednesday, May 4, 2005 7:13:38 PM(UTC)
JKrider

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/17/2005(UTC)
Posts: 9
Location: Apple Valley, CA

I loaded it up today and works great. Thanks alot : )
jrp  
#5 Posted : Saturday, May 28, 2005 10:28:10 PM(UTC)
jrp

Rank: Newbie

Groups: Registered, Registered Users
Joined: 5/25/2005(UTC)
Posts: 5
Location: Norwich UK

JKrider wrote:
If working with a one minute chart, can i plot a pivot and s/r lines based on the prior days (not minutes) High/Low/close? I'm surprised i cannot find anything on daily pivots that can be ploted on any time scale. JK
JK Try this one also:- ---start--- {Capture H/L/C print from previous intraday's trading at specific times, use Time1 for start time & Time2 for end time} Time1:=Hour()=14 AND Minute()=32; Time2:=Hour()=21 AND Minute()=00; ldih:=ValueWhen(1,Time2,Ref(HighestSince(1,Time1,H),-1)); {last day intraday high} ldil:=ValueWhen(1,Time2,Ref(LowestSince(1,Time1,L),-1)); {last day intraday low} ldic:=ValueWhen(1,Time2,Ref(C,-0)); {last day intraday close} ldih; ldil; ldic; ---end--- Being based in the UK (GMT=0hrs) the above allows me to get a print of yesterday's DJ cash (GMT-5hrs) high, low and close from a 2 minute intraday chart, where the same opened at 14:30 hrs and closed at 21:00 hrs my local time. Hope this helps you as well as that excellent response from Jose, especially as with the above you can fragment any market into specific data portions - ie slice the H/L/C data into a morning session and an afternoon session etc. Also you can apply pivot points to this or fib calcs; the uses go on.... trade well & rgs
dieselpr  
#6 Posted : Sunday, June 12, 2005 3:09:46 AM(UTC)
dieselpr

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 130

Hi joetrade69, Can you plot your formula on a daily chart for stocks also?
garykong  
#7 Posted : Saturday, September 3, 2005 5:03:47 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi all, Based on Joetrade 69, we can plot the daily privot (based on previous day H, L, C) on intraday bars. How can we plot "3-day rolling pivot range" based on 3-day's H, L C? I am interested in plotting the following r1 and s1 only:- 3DPV1 = (highest high of last 3 days + lowest low of last three days + yesterday's close)/3 3DPV2 = (highest high of last 3 days + lowest low of last three days)/2 Diff = Abs(3DPV1 - 3DPV2) r1 = 3DPV1 + Diff s1 = 3DPV1 - Diff I initially want to code it, but failed.... need help on this.. Gary Joetrade 69's code
Quote:
{daily pivot on intraday bars} ic:=ValueWhen(1,ROC(DayOfWeek(),1,$)<>0,Ref(C,-1)); ih:=ValueWhen(1,ROC(Hour(),1,%)<0,HighestSince(2,ROC(Hour(),1,%)<0,Ref (H,-1))); il:=ValueWhen(1,ROC(Hour(),1,%)<0,LowestSince(2,ROC(Hour(),1,%)<0,Ref (L,-1))); mp1:=(ih+il+ic)/3; r2:=mp1+(ih-il); r1:=(mp1*2)-il; s1:=(mp1*2)-ih; s2:=mp1-(r1-s1); r1; r2; s1; s2;
garykong  
#8 Posted : Sunday, September 4, 2005 7:38:01 AM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi, I think I have made it ...
Quote:
{Yesterday's close} ic:=ValueWhen(1,ROC(DayOfWeek(),1,$)<>0,Ref(C,-1)); {highest high & lowest low of last 3 days} ih2:=ValueWhen(1,ROC(Hour(),1,%)<0,HighestSince(4,ROC(Hour(),1,%)<0,Ref(H,-1))); il2:=ValueWhen(1,ROC(Hour(),1,%)<0,LowestSince(4,ROC(Hour(),1,%)<0,Ref(L,-1))); mp1:=(ih2+il2+ic)/3; sn1:=(ih2+il2)/2; diff:=Abs(mp1-sn1); r1:=mp1+diff; s1:=mp1-diff; r1;s1;
Cheers!! Gary
Patrick  
#9 Posted : Sunday, September 4, 2005 4:02:08 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Looks good ... Good job Gary :D
garykong  
#10 Posted : Tuesday, September 6, 2005 11:58:19 AM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hay Patrick, Thanks for your complement! But I need help again as the indicator that I have created is not working sometimes.... See the attached jpeg file, I have plotted the lowest low for the past three days in "green line", highest high for past 3-day in "black line". The indicator works fine for the past few days.. but today, as you see the "green line" which is not correctly showing the right level of lowest low in 3 days..... Anybody can help? Gary
Patrick  
#11 Posted : Tuesday, September 6, 2005 2:39:33 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Try without your reference : [code:1:0cc5b6f3a2]{Yesterday's close} ic:=ValueWhen(1,ROC(DayOfWeek(),1,$)<>0,Ref(C,-1)); {highest high & lowest low of last 3 days} ih2:=ValueWhen(1,ROC(Hour(),1,%)<0,HighestSince(4,ROC(Hour(),1,%)<0,H)); il2:=ValueWhen(1,ROC(Hour(),1,%)<0,LowestSince(4,ROC(Hour(),1,%)<0,L)); mp1:=(ih2+il2+ic)/3; sn1:=(ih2+il2)/2; diff:=Abs(mp1-sn1); r1:=mp1+diff; s1:=mp1-diff; r1;s1;[/code:1:0cc5b6f3a2]
garykong  
#12 Posted : Tuesday, September 6, 2005 3:41:08 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Patrick, It doesn't work.... don't know why.... Gary
Patrick  
#13 Posted : Tuesday, September 6, 2005 4:43:23 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Alrigh waht about {Yesterday's close} ic:=ValueWhen(1,ROC(DayOfWeek(),1,$)<>0,Ref(C,-1)); {highest high & lowest low of last 3 days} ih2:=ValueWhen(1,ROC(Hour(),1,%)<0,HighestSince(3,ROC(DayOfWeek(),1,$)<>0,H)); il2:=ValueWhen(1,ROC(Hour(),1,%)<0,LowestSince(3,ROC(DayOfWeek(),1,$)<>0,L)); mp1:=(ih2+il2+ic)/3; sn1:=(ih2+il2)/2; diff:=Abs(mp1-sn1); r1:=mp1+diff; s1:=mp1-diff; r1;s1;
Jose  
#14 Posted : Tuesday, September 6, 2005 11:26:23 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Why reinvent the wheel? :smt064 This intraday pivot code works fine:
Quote:
JK, take a look at the MS code for intraday pivot levels found here: http://www.metastocktools.com/MACDH/Forex.htm
jose '-) http://www.metastocktools.com
garykong  
#15 Posted : Wednesday, September 7, 2005 1:35:24 AM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi Jose, I use your code to amend it to show the yesterday's Pivot Range (defined by Mark Fisher), it works fine....
Originally Posted by: (Plot on intraday charts)",0,0,0) Go to Quoted Post
But how can I plot 3-day's privot range based on the same logic? i.e Hd is the highest high of past 3 days, Ld id the lowest low of past 3-day, Cd is the same (yesterday's close).... BTY, I am inventing it as it is an indicator used by Mark Fisher on his ACD method.... Cheers! Gary
Jose  
#16 Posted : Wednesday, September 7, 2005 6:36:29 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Gary, this task should be a simple one. In the code above (previous page), change: Hd:=HighestSince(1,dStart,H); For: Hd:=HighestSince(3,dStart,H); And change: Ld:=LowestSince(1,dStart,L); For: Ld:=LowestSince(3,dStart,L); I've posted a new intraday pivots version at http://www.metastocktools.com/MACDH/Forex.htm . It now allows for variable x days lookback for the Highest/Lowest. jose '-) http://www.metastocktools.com
garykong  
#17 Posted : Wednesday, September 7, 2005 2:30:28 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Hi Jose, Thanks for your input, it works now!! Also, can you explain briefly the follwoing logic / algorithm of the following as I want to learn it? Hd:=HighestSince(pds,dStart,H); Hd:=ValueWhen(1,dStart,ValueWhen(2,1,Hd)); Hd:=ValueWhen(1,Hd>0,Hd); Thanks! Gary p/s Patrick, I think you should consider to add this (or similar stuff) to your training video (or something) to let us learn it as I can't find or learn it from Formula Primer!!!
Jose  
#18 Posted : Wednesday, September 7, 2005 10:48:14 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
garykong wrote:
Also, can you explain briefly the follwoing logic / algorithm of the following as I want to learn it? Hd:=HighestSince(pds,dStart,H); Hd:=ValueWhen(1,dStart,ValueWhen(2,1,Hd)); Hd:=ValueWhen(1,Hd>0,Hd);
Gary, I tend to put MS code together by breaking down the intended components, and see how they work. I'm not so good at translating it all into plain English, but here we go: Hd:=HighestSince(pds,dStart,H); "Highest High since the start of trading day today (pds=1), yesterday (pds=2), etc." Hd:=ValueWhen(1,dStart,ValueWhen(2,1,Hd)); This code line uses & replaces the previous Hd variable. Note the nested ValueWhen() functions. "Calculate the previous (yesterday) value of Hd (as defined in previous code line), and then calculate this value as of the start of each trading day." This stops the code from looking for today's shifting High. Hd:=ValueWhen(1,Hd>0,Hd); Again, this code line uses & replaces the previous Hd variable. It stops initial zero values from destroying the chart's scale by plotting values only from the end of the newly created null (N/A) zone. Sometimes this null zone is referred to as "The Twilight Zone" - many a chart have disappeared here, but that is another story... :shock: jose '-) http://www.metastocktools.com
garykong  
#19 Posted : Thursday, September 8, 2005 8:05:19 AM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Jose, Thanks for your explanation... nevertheless, I find it difficult to understand.... poor me! Gary Patrick, I strongly recommend that you could include a similar example to your training video to teach us!! thanks!!
garykong  
#20 Posted : Thursday, December 1, 2005 4:27:58 PM(UTC)
garykong

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/30/2005(UTC)
Posts: 112

Originally Posted by: Use Highest/Lowest of past x days",1,260,1) Go to Quoted Post
Dear Jose, I need your help again to modify the previously developed pivot range to develop two monthly pivot ranges that plot the pivot range on daily chart, i.e. the pivot range will be the same for the rest of the month once defined. The two monthly pivot ranges' calculations are the same, but based on different sets of data. 1) The "high", "low" and "close" are based on the last n trading days of last month (say 3 days, but made it amendable). Rest is the same as previous one. Pivot:=(Hd+Ld+Cd)/3; Val2:=(Hd+Ld)/2; Diff:=Abs(Pivot-Val2); PR1:=Pivot+Diff; PR2:=Pivot-Diff; PR1;PR2 2) The "high", "low" and "close" are based on the first n trading days of the month ](say 3 days, but made it amendable). Rest is the same. Well, I could not handle the day / calender codes..... so I need your help again! Many thanks!! Gary
Users browsing this topic
Guest (Hidden)
Similar Topics
Std Error Channel PowerPivots Plus (Formula Assistance)
by Derek Worswick 2/9/2015 5:44:57 PM(UTC)
PowerPivots Plus PP+ posts and discussions in one place (Plugins & Addons)
by ahmedalhosen 12/24/2012 1:39:33 AM(UTC)
powerpivots dll wanted (Formula Assistance)
by kfklaihk 12/27/2011 10:37:28 PM(UTC)
Power Pivots Plus (Plugins & Addons)
by EPHESUS1 12/8/2011 3:01:27 PM(UTC)
Price Expansions (EXP) Using Power Pivots Plus (Formula Assistance)
by Derek Worswick 6/29/2011 3:02:12 PM(UTC)
PowerPivots Plus for MetaStock (Third Party Add-Ons)
by kahill 2/13/2011 12:23:29 PM(UTC)
Power Pivots External Functions (Plugins & Addons)
by Ron 2/10/2008 10:37:50 AM(UTC)
Power Pivots - Pivot Breakout function (Formula Assistance)
by minnamor 7/3/2007 9:39:55 AM(UTC)
power pivots creation and validation (Plugins & Addons)
by pikachu 2/19/2007 6:55:04 AM(UTC)
PowerPivots Plus Help Needed (Plugins & Addons)
by nasdaqtrader 1/26/2007 7:34:12 AM(UTC)
Need the free trial PowerPivots Systems, Explorations, and Experts [RESOLVED] (MetaStock)
by timwilsn 8/12/2006 12:45:01 PM(UTC)
Pivots - from yesterday (Formula Assistance)
by jer99 6/29/2006 10:56:55 PM(UTC)
FXTA Pivots and Coloring (Product Wish List)
by chart11610 3/31/2006 4:25:58 PM(UTC)
PowerPivots Plus Add-on new Indicators (Plugins & Addons)
by anejanitin 3/20/2006 7:34:07 PM(UTC)
Trade Oracle vs Power Pivots (Plugins & Addons)
by neal 2/15/2006 10:36:58 PM(UTC)
2 Pages12>
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.