![]() |
|
| Discuss How to do this at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hi all , I want to scan stcks which are 15% near to their new ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
Hi all , I want to scan stcks which are 15% near to their new highs -- lows and 10% near to their 200DMA or EMA .... can anyone tell me how to this in Amibroker.
thanks in Advance Chintan |
|
#2
|
|||
|
|||
|
Quote:
Hi, Try this: //--- Begin ---- /* Scan for 15% Near New High AND New Low AND 10% Near EMA200 Script derived from "Scan New High and New Low" of the website: http://www.amibroker.com/library/detail.php?id=1106 and modified for this purpose */ //--User Input YMWD = ParamList("Choose scan by", "Day|Week|Month", 1); Wk = Param("New Week Hi/Lo", 52, 1, 52); Mth = Param("New Month Hi/Lo", 12, 1, 12); Days = Param("New Day Hi/Lo", 260, 1, 260); if (YMWD == "Week") { x = Wk; Days = 5*wk; } else if (YMWD == "Month") { x = Mth; Days = 20*Mth; } else { x = Days; } CurNewHigh = Ref(HHV(High,Days),-1); CurNewLow = Ref(LLV(Low,Days),-1); EMA200 = EMA(C, 200); NearEMA200 = C >0.90*EMA200 AND C<1.1*EMA200; //--10% NearNewHigh = C >0.85*CurNewHigh AND C <1.15* CurNewHigh; NearNewLow = C >0.85*CurNewLow AND C <1.15* CurNewLow; Buy = NearNewHigh AND NearEMA200; Sell = NearNewLow AND NearEMA200; Filter = (Buy OR Sell); AddTextColumn(FullName(), "Security", 1.0, colorDefault, colorDefault,200); AddTextColumn( WriteIf(Buy, "Near New High", WriteIf(Sell, "Near New Low", "")), "New High/Low", 1.2, colorDefault, colorDefault,100); //--- End ----- |
| 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.