![]() |
|
| 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 ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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.} |
|
#4
|
|||
|
|||
|
Quote:
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 ? |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
|||
|
|||
|
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. |
|
#9
|
|||
|
|||
|
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? |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
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.