![]() |
|
| Discuss Help for Amibroker Function & AFL at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hi everyone, I want your help to convert following Metstock function in Amibroker function: (1) ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
Hi everyone,
I want your help to convert following Metstock function in Amibroker function: (1) IsDefined( ) (2) BBandTop(c,15,E,3) (3) BBandTop(c,15,S,3) (4) PREV In amibroker we use BBandTop(c,15,3) but how to enter simple or exponantial period. Following is an AFL in which I want to explore Buy & Sell price for last 1 yrs of every stock: aa=Cross(C,EMA(C,20)); bb=Cross(EMA(C,20),C); state=IIf(BarsSince(aa)<BarsSince(bb),1,0); state>Ref(state,-1); Buy = state>Ref(state,-1); Sell = state<Ref(state,-1); Cll=IIf(Buy,C,0); sll=IIf(Sell,C,0); Filter=Buy ; AddColumn(Cll,"Bvalue"); AddColumn(sll,"svalue"); But when I run explore it give "0" in sell price column. Please guide me what changes should I do in the above afl. Regards, (moneypick) |
| Sponsored Links |
|
#2
|
|||
|
|||
|
Hi,
As I don't know Metastock language, I'm not able to help with your first query. Can you give me the link for Online reference of Metastock language? I think Prev means previous bars signal of an array. In AFL, its 'ref'. Regarding your AFL, I didn't understand it. If you can explain it, we can try to give/correct the AFL. Praveen. |
|
#3
|
|||
|
|||
|
Hi BV,
Here is description of metastock function for your perusal: bbandtop( DATA ARRAY, PERIODS, METHOD, DEVIATIONS ) EXAMPLE:bbandtop( close, 10, S, 2 ) FUNCTION Calculates the top Bollinger Band of DATA ARRAY using METHOD calculation method and shifted upward DEVIATION standard deviations. Valid methods are SIMPLE, EXPONENTIAL, WEIGHTED, TIMESERIES, TRIANGULAR, and VARIABLE (these can be abbreviated as S, E, W, T, TRI, and VAR). My question is, how shall we use METHOD in Amibroker. ------------------- isdefined(DATA ARRAY) FUNCTION Returns 1 if all data necessary to calculate the formula is available, 0 if not. EXAMPLE The formula "isdefined(mov(c,20,s))" will return a 0 if there are less than 20 periods of data loaded in the chart. ------------------------ The PREV constant allows you to create self-referencing formulas. A self referencing formula is one that is able to reference the "previous" period's value of itself. For example, the following is an example of a self referencing formula: ((H+L+C)/3) + PREV This simple formula divides the high, low, and closing prices by 3 and then adds this value to yesterday's value of the ((H+L+C)/3). The calculation of the popular indicator On Balance Volume illustrates the use of the PREV function. (if(c>ref(c,-1),1,-1)*volume)+PREV Although On Balance Volume can be calculated without the use of the PREV function, an exponential moving average cannot (other than using the mov() function). The following formula shows how a 18% exponential moving average (approximately 10-periods) is calculated using the PREV function. (close*0.18)+(PREV*0.82) ------------------------------ I have a system and I want to know closing price of every stock when BUY and SELL signal occurs. condition is --Every time Sell price after buy price. The said AFL created for that purpose. Regards, (moneypick) |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads for: Help for Amibroker Function & AFL
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help for Amibroker | suman | AmiBroker | 1 | 25th June 2007 11:23 AM |
| amibroker | mani_magar | AmiBroker | 6 | 6th January 2007 08:35 AM |
| AmiBroker | karthikmarar | Your Feedback & Suggestions | 8 | 30th July 2006 12:22 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.