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

Notification

Icon
Error

Options
Go to last post Go to first unread
Vanez  
#1 Posted : Monday, October 17, 2005 10:22:40 PM(UTC)
Vanez

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/17/2005(UTC)
Posts: 1
Location: Byron Bay > NSW > Australia

Hey all. Just letting you know that I just purchased MS last night... so I'm real new to this. I have this EXEL Spreadsheet that calculates Support And Resistance Lines. I used to have Incredible Charts, and I used to manually put in the values (as Horizontal Lines on the chart) the spreadsheet gave me, which was very painful. Then I found out the potential power of MS! I was wondering if it was possible to write an indicator/system that could do my spreadsheets calculation and my manual labour automatically! I've been looking around the site's forums for people with similar questions, but i believe that my question is on a commonly asked question, it just has a little twist that no one else has specifically asked. This is what I used to do: 1. Set my chart to monthly 2. Write down the PREVIOUS month's High Low and Close 3. Plug the previous month's H L and C into the spreadsheet. 4. The spreadsheet had this formula in itself: H= Previous Month's High L= Previous Month's Low C= Previous Month's Close Pivot =(H+L+C)/3 R1 =2*P-L R2 =(P-S1)+R1 R3 =2*P+(H-2*L) S1 =2*P-H S2 =P*(R2-S1) S3 =(2*P)-(2*H-L) With R1 being Resistance Line 1 and so on... and S1 being Support Line 1 and so on... 5. I'd then note the values it then calculated 6. Then I'd manually place a Horizontal Lines on the values I noted from the spreadsheets. 7. I'd then repeat steps 1-6 for every stock in my watch list!! (See what I mean :( ) Basically I'd do this every month to get an idea where all the Support and Resistance Lines are at, and when I apply the indicator/system, horizontal lines pop up on the chart, which satisfy the above formula. Question: Is it possible to design a code that does the above procedures automatically? If so, can you give me a look at what the code would look like? [color=red:4f4d1ef226](If you solve this you will be known as a champion knight in my books :D )[/color] If not, can you give me some tips that might enable me to achieve my goal? Thanks for reading my plea. Hope someone can give me feedback. Love always, Vanez
Jose  
#2 Posted : Tuesday, October 18, 2005 1:26:47 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)
Vanez wrote:
S2 =P*(R2-S1)
Perhaps this pivot should be something like S2= (P-R1)+S1 instead.
Vanez wrote:
Love always, Vanez
Unfortunately Love doesn't pay the bills. :? But since we've been asked to be nice to Newbies... MetaStock -> Tools -> Indicator Builder -> New -> Copy and paste indicator formula. [code:1:663f91001b] { Monthly pivots v2.0 } { ©Copyright 2002~2005 Jose Silva For personal use only. http://www.metastocktools.com } { Message } message:=Input("plot on Weekly/Daily/Intraday charts",0,0,0); { Month's start } mthStart:=Month()<>Ref(Month(),-1); { Previous Month's High } Hi:=HighestSince(1,mthStart,H); mHi:=ValueWhen(1,mthStart,Ref(Hi,-1)); mHi:=ValueWhen(1,mHi>0,mHi); { Previous Month's Low } Lo:=LowestSince(1,mthStart,L); mLo:=ValueWhen(1,mthStart,Ref(Lo,-1)); mLo:=ValueWhen(1,mLo>0,mLo); { Previous Month's Close } mCl:=ValueWhen(1,mthStart,Ref(C,-1)); mCl:=ValueWhen(1,mCl>0,mCl); { Pivot } pivot:=(mHi+mLo+mCl)/3; { Support & Resistance } R1:=2*pivot-mLo; S1:=2*pivot-mHi; R2:=(pivot-S1)+R1; S2:=(pivot-R1)+S1; R3:=2*pivot+(mHi-2*mLo); S3:=2*pivot-(2*mHi-mLo); { Plot pivots on chart } R3;R2;R1; pivot; S1;S2;S3 [/code:1:663f91001b] jose '-) [color=green:663f91001b]MetaStockTools.com[/color] [color=white:663f91001b].[/color]
Ugly_Dog  
#3 Posted : Friday, November 18, 2005 3:41:07 AM(UTC)
Ugly_Dog

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/13/2005(UTC)
Posts: 4

Jose Another newbie sends his love (and appreciation!) :)
brownsfan019  
#4 Posted : Tuesday, November 22, 2005 11:02:16 PM(UTC)
brownsfan019

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/9/2005(UTC)
Posts: 18

Jose, Thanks for the posting the monthly pivots too! I came back to ask for that, and there it was.
Users browsing this topic
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.