Hi Graphman, WOW!! -- I haven't heard of that program (WoW) for almost a decade. I used it along with Metastock for a while in the mid to late '90's before finding AB. I thought that it had not made the transition to the Millennium (well actually I had heard that they tried to patch it, but not very well). I think you'll really like AB; in many ways, WoW was a kludge, but it's programming language wasn't too difficult and you'll find the transition to AB fairly easy if you just build a table of equivalents formula and terms. I'm working from very old memories here but, for example, where WoW would use mov(C, X , e) for an exponential moving average of the close for X periods, AFL uses EMA(C,X). References to a prior period are about the same -- yesterday's close is ref(C,-1) in both. So in your buy Long statement, AFL would use:
Buy = ( EMA( C, baf_periods) -ref( EMA( C, baf_periods) , -1) ) > baf_percent; Of course you have to assign values to baf_periods and baf_percent. This can be done hard coded in the AFL code, or you can make them easily changeable with a Param() statement. Or in the case of the percent, you could have it dependant on some other calculation. I do not know or recall the Barns Adaptive Forecast formula, but you should define these before the buy and sell statement. I think you will enjoy AB as you get into it. Don't get frantic or frustrated, read thru the AFL functions in the User's Guide (Help -> Help contents -> AFL icon at the top). Initially focus on the functions most commonly used like chart displays plotting candles, bars, volume, moving averages and other indicators, before trying to master writing complicated chart displays, explorations or backtesting. AB has a tremendous amount of power, but if you start simple and build a solid foundation of understanding it is not difficult. IMHO, it is the folks that want to start using AB by writing and backtesting complicated trading systems from the outset that feel overwhelmed. My prescription is to first learn how to write indicators on a chart (including displaying a condition for a system), then learn how to write an exploration for a condition, then learn how to optimize the parameters for the system and finally learn how to backtest the system, send alerts to your email or phone, autotrade with a broker, etc. And don't be bashful asking for help here. There are many folks who will help someone who tries to solve their problem and hits a roadblock, posts the code that is giving them a problem or error, or can articulate what it is that they want to accomplish. Vague questions like "how do I code for strong stocks to buy" or "how do I write a system to find stocks like the attached chart shows" are usually impossible to answer, and I personally ignore them. Welcome and enjoy! Peace and Justice --- Patrick ----- Original Message ----- From: graphman27 To: [email protected] Sent: Friday, February 05, 2010 7:06 PM Subject: [amibroker] New Novice on Amibroker - Converting Window on Wall Street/Metastock code Window on Wall Street died on 1/1/2010. I am frantically trying to convert their language into Amibroker afl. I'm not good at this stuff, so only the extremely simple EMA, SMA type conversions were easy. I thought it would be easy, but I was wrong (at least for me). Any help with a simple conversion would be greatly appreciated. Here is an example from Window on Wall Street: Barnes Adaptive Forecast Buy Long: (mov(c,baf_periods,e)-ref(mov(c,baf_periods,e),-1))>baf_percent Sell Long: mov(c,baf_periods,e)-ref(mov(c,baf_periods,e),-1)<baf_percent User Parameters: baf_periods baf_percent Thanks - I'm pulling my hair out. ------------------------------------ **** IMPORTANT PLEASE READ **** This group is for the discussion between users only. This is *NOT* technical support channel. TO GET TECHNICAL SUPPORT send an e-mail directly to SUPPORT {at} amibroker.com TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at http://www.amibroker.com/feedback/ (submissions sent via other channels won't be considered) For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ Yahoo! Groups Links
