Traderji.com - Discussion forum for Stocks Commodities & Forex

52 week New High-New Low Index

Discuss 52 week New High-New Low Index at the MetaStock within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Is it possible to code a 52 week New High - New Low Index in ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > MetaStock

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 23rd May 2008, 09:35 PM
Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mortenso is on a distinguished road
Reputation: 10
Default 52 week New High-New Low Index

Is it possible to code a 52 week New High - New Low Index in Metastock. I want to create a New High - New Low Index based on 135 stocks I have in a Metastock directory. Any suggestions are appreciated.
Reply With Quote
  #2  
Old 24th May 2008, 07:45 AM
Member
 
Join Date: Apr 2007
Posts: 698
Thanks: 77
Thanked 74 Times in 33 Posts
chintan786 will become famous soon enoughchintan786 will become famous soon enough
Reputation: 103
Default Re: 52 week New High-New Low Index

i don't know whether this can be created in Metstock or not but u can get this information at moneycontrol . com ... and on BSE also.. checkout this link..

http://bseindia.com/mktlive/newhghlow.asp
Reply With Quote
  #3  
Old 24th May 2008, 07:55 AM
Member
 
Join Date: Apr 2007
Posts: 698
Thanks: 77
Thanked 74 Times in 33 Posts
chintan786 will become famous soon enoughchintan786 will become famous soon enough
Reputation: 103
Default Re: 52 week New High-New Low Index

here is ur Exploration...

ColA: {Close}C;
ColB: {52-week High} HighestSince(1, (DayOfMonth()=08 AND Month()=05
AND Year()=1998), H);
ColC: {52-week Low} LowestSince(1, (DayOfMonth()=08 AND Month()=05 AND
Year()=1998), L);

{Choose one of these filters}
{Filter 1:} ColA >= (0.9*(ColB))
{Filter 2:} ColB >= 2*ColC

{If you want both the conditions to be satisfied in the same query, just
join the two filters by the AND operator:}

Filter: (ColA >= (0.9*(ColB)) AND ColB >= ColC)

{One problem with the 52-wk High and 52-wk Low formula--every day you've got
to change the values for dayofmonth(), Month() and Year() functions. The
formula given above assumes that you would be running the query on May 07,
1998. Change the values of the above functions accordingly.}
Reply With Quote
  #4  
Old 28th May 2008, 01:20 PM
Member
 
Join Date: Oct 2007
Posts: 104
Thanks: 0
Thanked 8 Times in 3 Posts
Adheer is on a distinguished road
Reputation: 28
Default Re: 52 week New High-New Low Index

Quote:
Originally Posted by mortenso View Post
Is it possible to code a 52 week New High - New Low Index in Metastock. I want to create a New High - New Low Index based on 135 stocks I have in a Metastock directory. Any suggestions are appreciated.
Can you clarify your query a little further ?

Do you want to create a composite index comprising 135 stocks and then identify whether this composite index has hit new highs or lows ?

- or -

Do you want to identify the stocks (in your 135 stocks shortlist) that have hit new highs or lows ?
Reply With Quote
  #5  
Old 16th June 2008, 01:51 AM
Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mortenso is on a distinguished road
Reputation: 10
Default Re: 52 week New High-New Low Index

I want to identify the stocks (in my 135 stocks shortlist) that have hit new highs and new lows. I am going to use this info to create a new high - new low index.

I tried to create a new explorer with the provided formula but it fails with 'Filer reference to N/A value in column B'. There is probably something wrong with the highestsince/lowestsince functions. I have tried to modify the exploration but I am not able to get it to run. Any suggestions are welcome.
Reply With Quote
  #6  
Old 16th June 2008, 02:25 AM
Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mortenso is on a distinguished road
Reputation: 10
Default Re: 52 week New High-New Low Index

I found this old post from Trderji, it seems to solve my problem with calculating new high new low:


You can use this formula as an exploration:

New 52 Wk HIGH
if(h>ref(hhv(h,250),-1),h,0)

New 52 Wk LOW
if(l<ref(llv(l,250),-1),l,0)
__________________
Best Wishes!

Traderji
Reply With Quote
  #7  
Old 16th June 2008, 07:12 AM
Member
 
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
shura is on a distinguished road
Reputation: 20
Default Re: 52 week New High-New Low Index

The formula posted by Mortenso is woeks. I am using this since long. Here it is posted again.

Column A : Close
Column B : If(H > Ref(HHV(H,250),-1),H,0) (For high)
Column C : If(L < Ref(LLV(L,250),-1),L,0) ( For Low)

save in explorer and use it.
Regards,
Shura.
Reply With Quote
  #8  
Old 16th June 2008, 01:25 PM
Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mortenso is on a distinguished road
Reputation: 10
Default Re: 52 week New High-New Low Index

The formula for calculation the new high - new low index is as follows:

Col A: colA If(H > Ref(HHV(H,250),-1),H,0)
Col B: colB If(L < Ref(LLV(L,250),-1),L,0)
Filter colB>0 OR colA>0

I also like to calculate the index automatically by adding a new column Col C:
if(ColA>0 and ColB=0) then 1
if(ColA=0 and ColB>0) then -1

The syntax for ColC is not correct but describes the logic. Can someone familiar with the syntax please help me out.

It should also be possible to make a sum for ColC on the Result page after running the exploration. This would automatically calculate the NH-NL index value. Any suggestions?

Last edited by mortenso; 16th June 2008 at 01:36 PM.
Reply With Quote
  #9  
Old 18th June 2008, 02:51 AM
Member
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
mortenso is on a distinguished road
Reputation: 10
Default Re: 52 week New High-New Low Index

I have figured out how to display 1 for new high and -1 for new low:
Col A: colA If(H > Ref(HHV(H,250),-1),1,0)
Col B: colB If(L < Ref(LLV(L,250),-1),-1,0)
Filter colB<0 OR colA>0

To construct the complete index you need to edit the exploration and choose options and explore specific date. You then need to run the exploration for one day at a time to get one year history for the new high - new low index. This is very cumbersome. Anyone know if it is possible to automate this process?
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +5.5. The time now is 04:59 PM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com