Re: [amibroker] OT: installing OS again
On certain newer systems, you can go into the BIOS at the computer start, and tell the computer to look at another drive first. e.g.: In the old days, the computer was made to seek on the A: floppy drive first, if no disk, then it would go to the C: drive. Similarly you can tell the system to ignore external drives - floppy, CD, DVD ... You will need to create a bootable USB stick, then change the BIOS to boot off the USB port, and off you go. === To create a bootable USB stick - must be a clean stick. This will clean the stick and DELETE all data oon the disk. From the DOS BOX via cmd: Diskpart List disk Gives disk #'s Select disk # MAKE SURE THIS IS THE USB STICK! Clean Create partition primary Active Format fs=fat32 quick Assign Exit Then load the OS you want to install on the USB stick then load the OS using normal commands. === -= Cß =-
Re: [amibroker] Live Daily Data
Dennis, Data from DDE shows up that way. You have to subscribe to something like eSignal or IQFeed, which have this capability built in. As an alternative, if you are allowed to, you could devise a way to store the data from OEC Trader as it is being fed to Amibroker, but that would require someone with extensive file manipulation skills and/or programming skills. Chris - Original Message - From: Dennis Lipter To: amibroker@yahoogroups.com Sent: Friday, September 03, 2010 1:36 PM Subject: [amibroker] Live Daily Data Is this possible with AmiBroker? I want to plot daily data (with history) with the current data bar updating in real time. My trading platform OEC Trader plots charts like this. When I connect to OEC Trader with AmiBroker via DDE all I can get is Intra-Day Tic or Minute-Data. Is there a data vendor that supplies Real Time Daily Data? I trade futures, so for example I would want to plot the Dec Wheat contract with all the historical daily data plotted with the current data bar updated in real time. Thanks
Re: [amibroker] OT: Parallel port printer / USB print server
I have a Netgear PS101 connected to my router via Ethernet to a Laserjet 6P. Works great. Originally with Vista 32, then upgraded to Win 7 32, and still works great. My son has a 6P connected with an adapter directly to the USB on the motherboard back panel, that too works great. Sorry did not answer your question, but maybe your print server is part of a router. Just use the PS101 and an Ethernet cable is you have an open port.
[amibroker] Is Bar replay exposed in ole automation?
Is Bar replay exposed in ole automation? Sent to your iPad
Re: [amibroker] Re: AmiBroker running stinking slow on super fast new system ???
At the risk of being potentially wrong, since no one has said, I believe it must be the second one. HDD is faster RAM is faster Processor is faster. Only drawback is less overall RAM - Original Message - From: Weidong To: amibroker@yahoogroups.com Sent: Thursday, July 08, 2010 3:25 PM Subject: [amibroker] Re: AmiBroker running stinking slow on super fast new system ??? Plan to buy a new computer, which one is faster for AB exploration, 1.Inspiron 14 Notebook (Inspiron 1440) Intel Core 2 Duo P8700 2.53GHz, 1066Mhz, 3M L2 Cache 8GB, DDR2, 800MHZ, 2 DIMM 500G HARD DRIVE, 5400RPM Hard Drive Intel Graphics Media Accelerator 4500MHD 2. Dell Studio 14 (1458) Intel Core i7-720QM Quad Core Mobile CPU 4GB Shared Dual Channel DDR3 at 1066MHz 500GB 7200 RPM SATA Hard Disk Drive ATI Mobility Radeon HD 5450 1GB Thanks, --- In amibroker@yahoogroups.com, Keith McCombs kmcco...@... wrote: 50 times faster, is that what they told you? On 6/29/2010 09:49, gmorlosky wrote: I'm using alien technology (top secret Area 51 stuff) :-) --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, Keith McCombs kmccombs@ wrote: Where on earth did you get the 50 times faster from? On 6/27/2010 08:26, gmorlosky wrote: I am very disappointed in the speed I am getting running an Explore in AmiBroker 5.20. Here is my example: Both units are running the same 32 bit version of Amibroker 5.20, running the same Explore I created, with no other software other than basic antivirus running. *** Old system (about 7 years): Pentium D (single core) 2.4 mhz, 1 gig memory 233 mhz, 5400 rpm drive, Windows XP Pro Results of Explore (5500 sysmbols): CPU usage 100%, 8 minutes 5 seconds *** New system (about 2 months): i7-930 (quad core) 2.6 mhz, 6 gig memory 1600 mhz, 7200 high rpm drive, Windows 7 64 bit Results of Explore (5500 sysmbols): CPU usage 12%, 2 minutes 3 seconds *** Why so stinking slow ??? when the new system is roughly 50 times faster in overall processing ???
Re: [amibroker] Re: Adaptive standard deviation
Tim, I uploaded it for a brief time and without other factors, while operating at short intervals, I found it did not make money in backtesting. Have you found otherwise? Chris - Original Message - From: Tim To: amibroker@yahoogroups.com Sent: Wednesday, July 07, 2010 4:34 AM Subject: [amibroker] Re: Adaptive standard deviation Hello, Has no one tried out the Adaptive standard deviation bands? Thank you. Tim --- In amibroker@yahoogroups.com, Tim raven...@... wrote: Hello, Did anyone code and use the Adaptive standard deviation bands? How did they work relative to the standard Bollinger bands? Was there any noticeable difference? Thank you. Kindest regards, Tim
Re: [amibroker] Does running multiple instances of AB increase processing power?
Write tracking variables to mysql. Sent to your iPad -Original Message- From: Herman psy...@magma.ca Sender: amibroker@yahoogroups.com Date: Fri, 2 Jul 2010 15:33:10 To: AmiBroker User Groupamibroker@yahoogroups.com Reply-To: amibroker@yahoogroups.com Subject: [amibroker] Does running multiple instances of AB increase processing power? My system information tells me I run: Processor Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz, 2660 Mhz, 4 Core(s), 4 Logical Processor(s) I can easily partitioned my code into 4 modules that can run independent, for example: 1) Scanning 2) Charting 3) Automated and manual Trading (IBc/TWS) 4) Graphical user interface The amount of shared information between these modules would be minimal and could be communicated using small files. My question is: Would I gain processing power if i were to run each module in a separate instance of AB? If so, what is the best way to create a common User Interface that would control each module. Any information on how to best utilize the computer's resources would be much appreciated. Herman
Re: [amibroker] Re: Does running multiple instances of AB increase processing power?
I'll post a function shortly. Making sure you have the right format is tedious and that is what the function deals with. A tough part is following the instructions on /ODBC.html on how to make a so called system DSN. One reason to use a database is because it allow multiple writes and reads. Sent to your iPad -Original Message- From: Ted Byers r.ted.by...@gmail.com Sender: amibroker@yahoogroups.com Date: Fri, 2 Jul 2010 18:02:43 To: amibroker@yahoogroups.com Reply-To: amibroker@yahoogroups.com Subject: Re: [amibroker] Re: Does running multiple instances of AB increase processing power? I don't know about the other issues discussed in this thread, except that for an application to truly get the maximum benefit from multiple cores or multiple processors, it generally needs to be rewritten, not only to make extensive use of multithreading, but to manage precisely how to allocate computing tasks among the available processors. In lieu of that, you're stuck with the same performance, but not adversely being affected by most of the other tasks the system has to do, or running multiple instances of the program. These latter options do not scale well in terms of getting more work done faster. Fortunately, for application programmers, there is Intel's threading building blocks library. Alas, for something like AmiBroker, which predates Intel's TBB, using it well would require a major rewrite. That is something I'd recommend being done, but not something I'd expect any time soon. What I do have extensive experience with is MySQL. It is open source, so it is free. You can implement what you need very quickly as long as you have a good understanding of SQL. Installation is not for the faint of heart, but this is true of all the open source databases I have seen. It IS reliable, and is used by a variety of businesses as a suitable, inexpensive alternative to MS SQL Server, Oracle, or IBM's DB/2. NB: I have not even looked at how to get AB to talk to MySQL, but if you can get your data from AB in CSV files, getting it into MySQL is a trivially simple load SQL statement. HTH Ted On Fri, Jul 2, 2010 at 5:47 PM, Rob sidharth...@yahoo.com wrote: Herman, I don't know what sort of info you intend to pass between instances... As for myself, I am sharing some .csv files... not arrays in and of themselves... I'd be interested in mysql as long as it was easy to implement, quick, reliable and free (i.e. only some of my time required)...
[amibroker] mysql / odbc
Herman, Below are 4 steps. I know its a lot, but conceptually it is the same as .csv files. The advantage as I see it is you can write and read simultaneously. You can also retrieve massive amounts of data over a very long period of time from the database, rather than just reading a .csv and scrolling through the fields). And, you can write to databases anywhere on the Internet or on your LAN (must have IP address). This still does not address how you can use a single datasource such as eSignal and populate 3 or 4 instances, though the other datasources mentioned apparently allow that and I appreciate the tip because eSignal has nagware and and restrictions about doing such things. 1) FUNCTION. Here is some heavily traced and commented code, plus some test features. I never took the time to remove those because these writes are only triggered when I get a fill in my main code. To summarize, what happens here is there is a command in sql called INSERT. You can google insert mysql to get more about it. /*this one writes to sql based on systime plus also carries sig tradetype*/ function WriteToSQLsystime2 (sigtype,tradetype,timesincewrite,ticker,TradeQuantity,Last,Lvtnticker,ORderid,BarsSinceTrade) { allowtrace=1; if(allowtrace){_TRACE(BEGIN WRITE TO SQL FUNCTION);} if(allowtrace){_TRACE( Var's Passed:+sigtype+ +tradetype+ +timesincewrite+ +ticker+ +TradeQuantity+ +Last+ +Lvtnticker+ +ORderid+ + BarsSinceTrade);} /*Title=Title+tradetype+timesince+ticker+pos+Last;*/ /*tradetype is buy, sell, short or cover*/ /*timesince is in timenum format, intended to be something like or 300*/ /*ticker is ticker in underlyign sense, eg CSCO*/ /*pos is positionsize in shares*/ /*Last is most recent share price*/ /*StaticVarSet(DBWrite + Ticker, Lvtnticker); /*sets the last database write value*/ /*if(allowtrace){_TRACE(StaticVarGet(DBWrite+Ticker));}*/ odbcOpenDatabase(DSN=Fin); AB=CreateObject(Broker.Application); /*9A-on signal, write to database*/ sqltest = ParamTrigger(sqltest,Insert sql info); /*THIS COULD BE A FUNCTION*/ yr=StrReplace(StrReplace(NumToStr(LastValue(Now(8))),0.00,),,,); mo=StrLeft(StrReplace(StrReplace(NumToStr(LastValue(Now(7)))+,.000,), ,),1); if(StrLen(mo) ==1){mo=0+mo ;} dy=StrReplace(NumToStr(LastValue(Now(6)))+,.000,);dy=StrReplace(dy, ,); if(StrLen(dy) ==1){dy=0+dy ;} Ho=StrReplace(NumToStr(Hrtn( Now(4) ))+,.000,);Ho=StrReplace(Ho, ,); if(StrLen(Ho) ==1){Ho=0+Ho ;} mi=StrReplace(NumToStr(mitn( Now(4) ))+,.000,);mi=StrReplace(mi, ,); if(StrLen(mi) ==1){mi=0+mi;} se=StrReplace(NumToStr(setn( Now(4) ))+,.000,);se=StrReplace(se, ,); if(StrLen(se) ==1){se=0+se;} dtformysql = yr+-+mo+-+dy+ +Ho+:+mi+:+se; /*THIS WOULD BE THE END OF THE function*/ printf(dtformysql =+dtformysql+\n); if(allowtrace){_TRACE(dtformysql=+dtformysql);} /*THE FOLLOWING IS A MANUAL EXAMPLE OF HOW TO WRITE TO THE SQL DATABASE*/ if(sqltest==1){ /*odbcExecuteSQL(INSERT INTO trades (DATE,price,SYMBOL) VALUES ('+dtformysql+' , +Last+, '+Name()+' ));*/ odbcExecuteSQL(INSERT INTO trades (tradetype,numshares,comment,DATE,price,SYMBOL,oid) VALUES ( '+tradetype+', +numshares+ , '+Comment+' , '+dtformysql+' ,+Last+, '+Name()+ , '+ORderID+' )); }/*end MANUAL EXAMPLE OF HOW TO WRITE TO THE SQL DATABASE*/ ORderid=StrToNum(ORderid); if(tradetype==BOT or tradetype==BUY){tradetype=BOT;numshares=TradeQuantity;Comment=sigtype; if(allowtrace){_TRACE(tradetype=+tradetype);} if(allowtrace){_TRACE(numshares=+numshares);} if(allowtrace){_TRACE(comment=+Comment);} if(allowtrace){_TRACE(dtformysql=+dtformysql);} if(allowtrace){_TRACE(last=+Last);} if(allowtrace){_TRACE(ticker=+Ticker);} if(allowtrace){_TRACE(orderid=+ORderid);} if(allowtrace){_TRACE(sql=+tradetype+', +numshares+ , '+Comment+' , '+dtformysql+' ,+Last+, '+ticker+' , +ORderID+,+BarsSincetrade+ ));} successfulinsert=odbcExecuteSQL(INSERT INTO trades (tradetype,numshares,comment,DATE,price,SYMBOL,oid,Held,Last) VALUES ( '+tradetype+', +numshares+ , '+Comment+' , '+dtformysql+' ,+Last+, '+ticker+' , +ORderID+,+TimeSinceWrite+,+Last+ )); if(allowtrace){_TRACE(successful insert=+successfulinsert);}} if(tradetype==SEL or tradetype==SOLD){tradetype=SEL;numshares=TradeQuantity;Comment=sigtype; if(allowtrace){_TRACE(tradetype=+tradetype);} if(allowtrace){_TRACE(numshares=+numshares);} if(allowtrace){_TRACE(comment=+Comment);} if(allowtrace){_TRACE(dtformysql=+dtformysql);} if(allowtrace){_TRACE(last=+Last);} if(allowtrace){_TRACE(ticker=+Ticker);} if(allowtrace){_TRACE(sql=+tradetype+', +numshares+ , '+Comment+' , '+dtformysql+' ,+Last+, '+ticker+' , +ORderID+ ));} successfulinsert=odbcExecuteSQL(INSERT INTO trades (tradetype,numshares,comment,DATE,price,SYMBOL,oid,Held,Last) VALUES ( '+tradetype+', +numshares+ , '+Comment+' , '+dtformysql+' ,+Last+, '+ticker+' , +ORderID+,+TimeSinceWrite+,+Last+ )); if(allowtrace){_TRACE(successful insert=+successfulinsert);}} if(tradetype==SSH or
[amibroker] normalized plot question
I'm trying to plot the (close / first visible bar) of the selected ticker so that it begins from the left side of the chart at 1.0 and if it were to advance 2%, it would show 1.02 on the right side of the chart. I am pretty close, but I'm getting some confusing behavior that I think has to do with QuickAFL. Can someone cut and paste this code and tell me what is happening, please? function GetVisibleBarCount2() { lvb2 = Status(lastvisiblebar); fvb2 = Status(firstvisiblebar); return Min( Lvb2 - fvb2, BarCount - fvb2 ); } barcnt2=getvisiblebarcount2(); Plot(barcnt2,barcnt2,colorViolet,styleOwnScale); Lkb2k=barcnt2; normalizedC= C/ ValueWhen(BarIndex()==Lkb2k,C); Plot(normalizedC,normalizedC,colorBlue,styleOwnScale); ?/*I've tried this with and without SetBarsRequired*/ SetBarsRequired(sbrAll, sbrAll );
Re: [amibroker] Re: normalized plot question
Thank you, Mike. I never noticed you could call just one value from an array without using loops like you did there. Best, Chris - Original Message - From: Mike To: amibroker@yahoogroups.com Sent: Tuesday, June 29, 2010 2:06 PM Subject: [amibroker] Re: normalized plot question I think that you're asking for this: firstbar = Status(firstvisiblebar); Plot(Close / Close[firstbar], Buy Hold, colorDarkGrey, styleLine); Mike --- In amibroker@yahoogroups.com, Chris DePuy cde...@... wrote: I'm trying to plot the (close / first visible bar) of the selected ticker so that it begins from the left side of the chart at 1.0 and if it were to advance 2%, it would show 1.02 on the right side of the chart. I am pretty close, but I'm getting some confusing behavior that I think has to do with QuickAFL. Can someone cut and paste this code and tell me what is happening, please? function GetVisibleBarCount2() { lvb2 = Status(lastvisiblebar); fvb2 = Status(firstvisiblebar); return Min( Lvb2 - fvb2, BarCount - fvb2 ); } barcnt2=getvisiblebarcount2(); Plot(barcnt2,barcnt2,colorViolet,styleOwnScale); Lkb2k=barcnt2; normalizedC= C/ ValueWhen(BarIndex()==Lkb2k,C); Plot(normalizedC,normalizedC,colorBlue,styleOwnScale); ?/*I've tried this with and without SetBarsRequired*/ SetBarsRequired(sbrAll, sbrAll );
[amibroker] Re: New 3rd party toolset for AmiBroker
Hi Paul, You appear you have made a great effort, and for what could be a great tool for Amibroker users. However, when I look at your web site, I see lots of legalese, but no address or location. Like the program, the Web site is like a black box (FWIW, I had a similar issue with Pattern Explorer on the onset). I think at the very least you need to mention the town country for legal purposes, in particular, where the terms will be enforced. Do also remember, that when paying by credit card, the final user cost depends on the local currency subsequent conversion fees. Good luck with your program. I'm a potential buyer, but I'll wait for user review or TASC review. Cheers, -= Chris =-
Re: [amibroker] Re: New 3rd party toolset for AmiBroker
Ah! You guys have a very active and strong TA base. I think mentioning 'AUS' is a positive I would advertise. Thank you for the update. -= Chris =- - WiseStockTrader wisestocktra...@yahoo.com wrote: Hello Chris You have a valid point. We are a registered business in Australia. I will add this information to the site. Regards, Paul I think at the very least you need to mention the town country for legal purposes, in particular, where the terms will be enforced.
Re: [amibroker] Simulating a mouseclick from afl
Herman, I can think of this, possibly, as a solution: (a) Use alertif to run a .exe that clicks the mouse. You can create a .exe that clicks the mouse using something like vTask Studio. If you don't have it, I can create that .exe and email it to you May I ask you a question? Are you trying to get refreshes more frequently than executed ticks so that you can act on book changes before the tick? I've pondered how to do this in amibroker for some time, as by design, the screen refreshes upon tick execution (or requested time refresh of each 1 second). Seems to me that there might be one other way of doing it, and that is by: (b) running js that draws upon Amibroker AA (via OLE automation) every so often. I haven't tried this at very frequent refresh interverals (eg 1 sec) Best, Chris - Original Message - From: Herman psy...@magma.ca To: AmiBroker User Group amibroker@yahoogroups.com Sent: Friday, June 18, 2010 2:12 AM Subject: [amibroker] Simulating a mouseclick from afl Hello, I often have a need to refresh the selected chart from afl, for example to create responsive GUIs. I have seen code to simulate key-strokes, would anyone know if it is possible to simulate a Mouse-click from afl? Many thanks for any help you can give, Herman 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 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) * To change settings via email: amibroker-dig...@yahoogroups.com amibroker-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: amibroker-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [amibroker] Re: Problem getting CMAE Optimizer to run
Gordon, Your code works fine on my computer with the following changes: change cmae to spso (cmae is experiencing some problems that are well documented in this forum). You can also add this to simplify the testing: OptimizerSetOption(MaxEval,1 ); OptimizerSetEngine(spso); OptimizerSetOption(MaxEval,1 ); B = Optimize(B,21,8,34,1); S = Optimize(S,13,5,20,1); Buy =Cover= Cross(C,EMA(C,B) ); Sell = Short=Cross(EMA(C,S),C ); MaxPos = 12; SetOption(MaxOpenPositions, MaxPos); PositionSize = -100/MaxPos; - Original Message - From: Gordon Sutherland To: Amibroker Sent: Monday, June 07, 2010 4:40 PM Subject: [amibroker] Re: Problem getting CMAE Optimizer to run Hi, I am having a problem getting the in-built non-exhaustive Optimizer cmae to run (or spso and trib for that matter). I can get the standard exhaustive Optimizer to run no problems. When I hit Optimizer in AA the program runs the first line and stops there. Before I burden Marcin with this problem I wonder if somebody with a similar configuration could run this basic AFL code in the Portfolio Mode and let me know if it runs OK. I am using Weekly mode but Daily or Monthly don't run for me either. I have not used the non-exhaustive Optimizer for quite a few months but have never had problems with it in the past. My set-up is: Windows 7 (x64); AB Pro 5.30.1 (32 bit); Here is a basic set-up that I am using to troubleshoot the problem: OptimizerSetEngine(cmae); B = Optimize(B,21,8,34,1); S = Optimize(S,13,5,20,1); Buy= Cross(C,EMA(C,B) ); Sell = Cross(EMA(C,S),C ); MaxPos = 12; SetOption(MaxOpenPositions, MaxPos); PositionSize = -100/MaxPos; Thanks, Gordon Sutherland
Re: [amibroker] Re: Extracting last record from Text file
Assuming it is always the 4th item, you might use this List=m,n,p,q; fourthitem=StrExtract(List,3); Title= +List+ 4th=+fourthitem; You might have to mess with other String functions. Or you might have to count commas in List and then extract the last one based on that. - Original Message - From: wpok543 To: amibroker@yahoogroups.com Sent: Thursday, June 03, 2010 4:10 PM Subject: [amibroker] Re: Extracting last record from Text file I don't get a clue from the docs for fgets(). Can anyone point me in the right direction? --- In amibroker@yahoogroups.com, ovtrad...@... ovtrad...@... wrote: Check the docs for fgets, the example should get you started. ovt --- In amibroker@yahoogroups.com, wpok543 thedog8it@ wrote: The following code extracts the first record from the text file. How would I extract the last record? The Text file looks like this. 314 B,06/22/1989 S,08/22/1990 B,03/05/1991 The code: FileName = Test; fh = fopen(C:// + FileName + .sig ,r); if(fh) {printf(FileName + .sig Opened\n);} else {printf(FileName + .sig Failed to Open\n);} List = fgets(fh); printf(List);
Re: [amibroker] Problem removing OptimizerSetEngine(cmae);
James, remove cmae.dll from the add in directory. i'm using spso for now as an alternative. I've noticed that if any formula in any open window refers to cmae, then it'll trigger it. Hope that helps. Chris - Original Message - From: James To: amibroker@yahoogroups.com Sent: Tuesday, June 01, 2010 3:09 PM Subject: Re: [amibroker] Problem removing OptimizerSetEngine(cmae); I am assuming this intermittent bug in CMAE still exists because I am still having the problem. Was this fixed in a later version that I missed and if not, any idea if this will ever be fixed? - James AmiBroker version 5.29.6.5096 ( cooltool.dll 5.28.0, mfc42.dll 6.2.4131, msvcrt.dll 7.0.2600 ) Microsoft Windows XP version 5.1 (Build 2600) Service Pack 3.0 Common Controls: 6.0 Unhandled exception Type: CSysException Code: c005 Description: ACCESS VIOLATION Address: 69015ADB Detailed exception information: Broker.exe caused an EXCEPTION_ACCESS_VIOLATION in module CMAE.dll at 001B:69015ADB Call Stack: 001B:69015ADB CMAE.dll 001B:6901143F CMAE.dll CPU Registers: EAX= EBX=69019B9C ECX= EDX= ESI=690192C0 EDI= EBP= ESP=0007 EIP= FLG=00010297 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS= AFL Parser status: Processing stage: NONE Formula ID: 0 () Action 5 (BACKTEST) -- From: Tomasz Janeczko gro...@amibroker.com To: amibroker@yahoogroups.com Sent: Mon, February 1, 2010 12:44:49 PM Subject: Re: [amibroker] Problem removing OptimizerSetEngine(cmae); Hello, No it is not memory error. This is some intermittient bug in CMAE. You would need to close AmiBroker and move CMAE.DLL outside Plugins directory when it happens. Best regards, Tomasz Janeczko amibroker.com On 2010-02-01 17:13, James wrote: Ton, 1. 1GB of Ram 2. 61 optimization steps, the total number for exahustive optimization 3. It was happening almost immediately after hitting the optimize button, but just now I tried running one of the files that was making it crash and cannot get it to crash. Even stranger the first time I ran the file today it took 5.5 minutes to run the 61 steps, and now I just ran it in 42 seconds. I don't understand it. It must have been a memory problem on my end, but this occurred on Friday, Saturday and Sunday, but it is not happening now. Plus the exception report included the line below regarding module CMAE.dll, but this was when I had removed the CMAE line and was attempting exhaustive optimization. AmiBroker version 5.29.6.5096 ( cooltool.dll 5.28.0, mfc42.dll 6.2.4131, msvcrt.dll 7.0.2600 ) Microsoft Windows XP version 5.1 (Build 2600) Service Pack 3.0 Common Controls: 6.0 Unhandled exception Type: CSysException Code: c005 Description: ACCESS VIOLATION Address: 69015ADB Detailed exception information: Broker.exe caused an EXCEPTION_ACCESS_ VIOLATION in module CMAE.dll at 001B:69015ADB Call Stack: 001B:69015ADB CMAE.dll From: Ton Sieverding ton.sieverding@ scarlet.be To: amibro...@yahoogrou ps.com Sent: Mon, February 1, 2010 8:37:37 AM Subject: Re: [amibroker] Problem removing OptimizerSetEngine( cmae); Hi James, Can you please let me know the following. Just to avoid a wrong conclusion ... 1. Internal memory on your system ? GBytes ? 2. Number of steps with exhaustive optimization ? Is 60 steps the total number or the number for cmae ? 3. Does this happen immed after hitting the OPTIMIZE button or after several steps ? So after 60 steps ? Regards, Ton. - Original Message - From: James To: amibro...@yahoogrou ps.com Sent: Monday, February 01, 2010 2:57 PM Subject: Re: [amibroker] Problem removing OptimizerSetEngine( cmae); There are only 60 steps and it crashes on the second one. I have been able to replicate it. Any code that I have this line: OptimizerSetEngine ( cmae ); will crash after I change it to: // OptimizerSetEngine( cmae); If I delete the line altogether, it still crashes. From: Steve Dugas sjdu...@comcast. net To: amibro...@yahoogrou ps.com Sent: Sun, January 31, 2010 6:42:42 PM Subject: Re: [amibroker] Problem removing OptimizerSetEngine( cmae); Hi - Exhaustive optimizer can crash if the opt has too many steps and it eventually runs out of memory. Does the crash happen well into the opt? Steve - Original Message - From: James To: amibro...@yahoogrou ps.com Sent: Sunday, January 31, 2010 6:26 PM Subject: [amibroker] Problem removing OptimizerSetEngine( cmae); Has anyone else had a problem removing
Re: [amibroker] Real time trading - questions on practicality
BS, The primary variables that I'm aware of that cause delay in scan/backtests are: (a) number of bars (b) complexity of calculations (c) number of tickers In the formula window, find the Tools, Code Check and profile feature that shows how long it takes to refresh the screen. that should guide somewhat. Having said that, 3 minutes for 1500-ish symbols sounds about right, at 0.12 seconds each. That is more or less my experience, when using relatively complex calculations over many bars. If you are accessing external data sources or changing tickers using Foreign, this will be like 10 times slower than if you kept the data all in the Ami database, FWIW. See if you can reduce bars. Alternatively, if you've found the holy grail, buy more computers and reduce the number of tickers per machine, grouping alphaetically or something like that, depending on your strategy. This makes it pretty complex to manage with multiple machines. Hope this helps. Chris - Original Message - From: B S To: amibroker@yahoogroups.com Sent: Wednesday, May 12, 2010 8:29 AM Subject: Re: [amibroker] Real time trading - questions on practicality Keith- I'm embarassed to say that I am just now (as a result of a vanity search) seeing that you've responded. Thank you and my apologies. What's even worse, I guess, is that your response is still helpful as I haven't yet found my way through the real time trading maze. I have my multiple strategy AFL together with money management logic and all that squared away, but I think I have some major performance issues to contend with. After doing all the EOD widdling down of symbol universes that I possibly can, I am still often looking at 1200 or so tickers to watch in real time. I'm happy to pay for the data and I've checked my strategy logic so that there should be no adverse effects from bad ticks (making me comfortable going with a slightly less expensive data provider that does not do any filtering). Before I pay for a 1000 or 1800 symbol plan, I'd like to know that my scans will actually be able to complete in a reasonable amount of time (would say absolute maximum of 3 mins per scan). To start, I will be running two 5min strats and one 60min. However, I've tried testing an extremely simple single strategy on 5min historical data with n last quotations = 1 on a universe of 100 symbols and it took 84 seconds. I'm not sure if that's an appropriate test, but it certainly doesn't look promising for getting 1000-1800 symbols done in under 3 minutes. Anyhow, I'm looking for guidance from anyone who has done some real time trading/testing in AB on what's realistic to expect in terms of number of symbols to process in 3mins (i know this can be vary widely among AFLs but ballpark idea would be very helpful). Also, any suggestions for appropriate settings/tips to process the symbols as quickly as possible would be a big help. Thanks in advance. -- From: Keith McCombs kmcco...@engineer.com To: amibroker@yahoogroups.com Sent: Sat, April 17, 2010 4:15:00 PM Subject: Re: [amibroker] Real time trading - questions on practicality B S -- I understand your desire to automate multiple intraday strategies. So, regarding your four questions. 1. I wouldn't reject the idea of combining strategies into one afl. Because: 1.1 It is easy to do. Just put each of your systems in a separate .afl file, and have one master control .afl to call the separate files using #include. 1.2 I don't know how you want to handle available buying power. Do you want your multiple strategies to share money, or keep it separate? But what ever way you decide can be handled best by the master control .afl. 1.3 What if more than one strategy wants to buy the same stock, or maybe even one wants to buy while another wants to sell the same stock? I don't know what you want to do in these cases, but once you decide, put it in master control. 2.0 Personally, would use explore or scan. I don't know what would be the advantage of backtest over either of these two. 3.0 3.1 ~2000 tickers: Not in real time, but maybe 1800 for $$$. However, can you use EOD to reduce down to say ~100? IB can handle 100 tickers max in real time. See: http://www.amibroke r.com/guide/ h_quotes. html to find out what some of your choices are. 3.2 What do you call a bad tick? Is it typo, or a single transaction at market near lunch time when volume was low. Can you tell the difference? Does it matter? To me a bad tick is one I can't use in my strategy. So, my strategy has to deal with what I call 'bad' ticks. 4.0 I don't know. But my guess is that the answer is pretty complex and is a function of your computer speed, what other software you have running, your internet connection, and your data supplier
Re: [amibroker] redundent ISP for internet
Linksys RV042 works great, too. I've used for years. - Original Message - From: Sidney Kaiser To: amibroker@yahoogroups.com Sent: Saturday, May 08, 2010 7:41 PM Subject: Re: [amibroker] redundent ISP for internet I'm using a Netgear FVS 336G, firewall, router, switch with load balancing/failover for two WAN inputs. Works like a champ to switch to my DSL connection when the cable connection goes down. (twice last week) Price is ~$250 or so from BH photo. Sid At 03:11 PM 5/8/2010, you wrote: i have issues with my ISP disconnecting early morning, around 3-4 am EST. i want to setup a redundant internet connectivity with either cable ISP or wireless. can you share your ideas on what technology/hardware - software is needed. thanks in advance
Re: [amibroker] Re: Optimization
Use walk forward feature. You must run out of sample. Read Howard Bandy's book to get much more on this topic. - Original Message - From: Ricardo Ribeiro Romero To: amibroker@yahoogroups.com Sent: Thursday, May 06, 2010 7:13 PM Subject: Re: [amibroker] Re: Optimization Tks Mike, another question. Can I trust the results ? The Net Profit to me is to high. :) On Thu, May 6, 2010 at 10:48 PM, Mike sfclimb...@yahoo.com wrote: Run your optimization, then scroll the results table all the way to the right. The last two columns will be the values used in each combination (i.e. range1, range2). Mike --- In amibroker@yahoogroups.com, Ricardo listaora...@... wrote: Hi ALL. I´m new with AMIBROKER, I bought the software only few days ago, and it´s amazing what we can do. :) I´m trying to understand a optimization, and here is the best place to ask. Running the script below ( optimize button ) -- Range1=Optimize(range1,3,3,100,1); Range2=Optimize(range2,6,6,100,1); Buy = Cross((Close),(EMA(Close,range1))); Buystop = Ref(EMA(Close,range1),-1); BuyPrice = Max(Buystop,Low); Sell = Cross(EMA(Close,range2),(Close)); Sellstop = Ref(EMA(Close,range1),-1); SellPrice = Min(sellstop,High); Short = Sell; Cover = Buy; -- How can I know what is the values for both EMA´s ? If I run a BT, and double click on some result for BT, will show the arrows, but how can I know what is the EMA´s value ? Thanks in advance, Ricardo.
Re: [amibroker] SPLIT
alt s s its in the menu - Original Message - From: Ricardo To: amibroker@yahoogroups.com Sent: Wednesday, May 05, 2010 2:01 PM Subject: [amibroker] SPLIT Hi ALL. How can I do SPLIT for a single stock ? Tks in advance, Ricardo.
Re: [amibroker] Re: Migrating Database to MySQL
Soham, I didn't migrate from ami db to mysql, as I had tick level data in .csv format that i just imported to mysql, but the way you could do that is to export the data from amibroker to a .csv, then take the .csv (or .csv's) and move them to mysql. I believe the easiest way to do that is to create a simple .afl that includes the columns you want sent to mysql, then run aa/explore, then click FILE export, save as. A simple .afl example would be: Filter=1; AddColumn(O,o,1.2); AddColumn(H,h,1.2); AddColumn(L,l,1.2); AddColumn(C,c,1.2); AddColumn(V,v,1.2); Both Tomasz and I have advised against this, however, for performance reasons. Chris - Original Message - From: sohamdas To: amibroker@yahoogroups.com Sent: Tuesday, May 04, 2010 10:31 AM Subject: [amibroker] Re: Migrating Database to MySQL Chris, how did you do that at the first place. Migrating the Ami db to SQL or say, Berekeley DB kind of db. Soham --- In amibroker@yahoogroups.com, Tomasz Janeczko gro...@... wrote: Hello, AmiBroker's own database is designed with high speed quotation data retrieval in mind, while general-purpose databases are too general to offer comparable speed. Best regards, Tomasz Janeczko amibroker.com On 2010-04-30 16:55, Chris DePuy wrote: I have done what you are suggesting, and Amibroker is capable is retrieving information from mysql (or any sql via odbc). My experience, however, is that retrieving high-resolution data from mysql (price and volume) into Amibroker is much slower than running it from Amibroker natively. I cannot say exactly how slow as I haven't taken the time to study it, and I realize that mysql re-keying http://www.experts-exchange.com/articles/Database/MySQL/3-Ways-to-Speed-Up-MySQL.htmland indexing http://http://articles.sitepoint.com/article/optimizing-mysql-application/4can change these speeds (I'm no expert on that topic), but anecdotally I can tell you its like 1/10th as slow. I attempted once to read a couple months of data of the NASDAQ-100 at the 5-second bar level and the Amibroker just froze as it tried to refresh the screen. I had to task-manager kill Broker.exe to get to the next step. To answer your question directly, though, you just use the odbc http://www.amibroker.com/odbc.html plugins (there are two of them - one to allow you to retrieve price and volume as you are asking and the other to allow more ad hoc retrieval of non price / volume data). I am successfully using mysql to retrieve non price/volume data and integrating it into price/volume data that is stored in amibroker's database. - Original Message - *From:* sohamdas mailto:soham...@... *To:* amibroker@yahoogroups.com mailto:amibroker@yahoogroups.com *Sent:* Wednesday, April 28, 2010 11:55 PM *Subject:* [amibroker] Migrating Database to MySQL Hi Tomasz, others I have a database complete with 5 years of intraday data,1min timeframe, in 1500symbols +. I would like to migrate this database to a generic MySQL database,so that I can stay platform independent. For reasons obvious, I wont be able to export each and every symbol and import it to SQL. a. I am seeking a easy way to achieve the same. b. How can we interface AMI with an external database. Help appreciated.
Re: [amibroker] IB: Exit all long positions automatically at 15:00 - 15:30
sellatendofday=timenum()==125955; Sell=condition1 or sellatendofday; - Original Message - From: Leif P To: amibroker@yahoogroups.com Sent: Saturday, May 01, 2010 12:07 PM Subject: [amibroker] IB: Exit all long positions automatically at 15:00 - 15:30 When using IB intraday, what is the syntax for selling anything that's long (open) at say 15:00 or 15:30? (Have there ever been optimization discussions on this issue?) I mainly don't want to take anything home with me at the end of the day.
Re: [amibroker] Migrating Database to MySQL
I have done what you are suggesting, and Amibroker is capable is retrieving information from mysql (or any sql via odbc). My experience, however, is that retrieving high-resolution data from mysql (price and volume) into Amibroker is much slower than running it from Amibroker natively. I cannot say exactly how slow as I haven't taken the time to study it, and I realize that mysql re-keying and indexing can change these speeds (I'm no expert on that topic), but anecdotally I can tell you its like 1/10th as slow. I attempted once to read a couple months of data of the NASDAQ-100 at the 5-second bar level and the Amibroker just froze as it tried to refresh the screen. I had to task-manager kill Broker.exe to get to the next step. To answer your question directly, though, you just use the odbc plugins (there are two of them - one to allow you to retrieve price and volume as you are asking and the other to allow more ad hoc retrieval of non price / volume data). I am successfully using mysql to retrieve non price/volume data and integrating it into price/volume data that is stored in amibroker's database. - Original Message - From: sohamdas To: amibroker@yahoogroups.com Sent: Wednesday, April 28, 2010 11:55 PM Subject: [amibroker] Migrating Database to MySQL Hi Tomasz, others I have a database complete with 5 years of intraday data,1min timeframe, in 1500symbols +. I would like to migrate this database to a generic MySQL database,so that I can stay platform independent. For reasons obvious, I wont be able to export each and every symbol and import it to SQL. a. I am seeking a easy way to achieve the same. b. How can we interface AMI with an external database. Help appreciated.
Re: [amibroker] RSI
Just run explore for the Range: n last quotations n=1 And that will show you the ones for today Buy = RSI(14) 30; Sell = RSI(14) 90; Filter=Buy OR Sell; AddColumn( DateTime(), Date, formatDateTime ); AddColumn( RSI(14), RSI); AddColumn(Buy,buy,1.2); AddColumn(Sell,sell,1.2); - Original Message - From: Ricardo Ribeiro Romero To: amibroker@yahoogroups.com Sent: Friday, April 30, 2010 6:55 PM Subject: [amibroker] RSI Hi, How can I create a explorer to check a stock with RSI(n) 1 I was trying to use a explorer like this. But doesn´t work. Buy = RSI(14) 30; Sell = RSI(14) 90; Filter=Buy OR Sell; AddColumn( DateTime(), Date, formatDateTime ); AddColumn( RSI(14), RSI); Why doesn´t work ? B/c when I run the explore, show me some Ticker with RSI like 50 and I was trying to see only 30 or 90. Thanks in advance, RR
[amibroker] Rotational Trading question
Using rotational trading, does anyone know an easy way to buy the top 10% of scores and short the bottom 10% of scores generated at each bar?
Re: [amibroker] Sell ApplyStop
rise, I'm literally working with this same thing now. yes, you have to tell amibroker to put a 0 in each of the Sell array locations, otherwise it will sell. but, if you don't put a value in there, the backtester won't work. Chris - Original Message - From: rise_t575 To: amibroker@yahoogroups.com Sent: Thursday, April 15, 2010 1:19 PM Subject: [amibroker] Sell ApplyStop Hello, I guess I have a small problem with understanding the ApplyStop function. If I want to use the stop defined by the ApplyStop function as my only stop (e. g. stopTypeNBar for exiting after n days), the backtester still wants some condition for the Sell array (sell = ...), although I don't need another condition for selling. Is it correct in this case to assign just a False to the Sell array? Seems a bit strange to me... Sell = False; ApplyStop(stopTypeNBar, ...); Thanks in advance!
Re: [amibroker] Re: Sell ApplyStop
rise, You are correct. If you put a 1 (or true), it'll sell next bar each time. As for Sell=0; nbs=Optimize(nbs,140,10,140,10); ApplyStop(stopTypeNBar,stopModeBars,nbs); These settings, they work too. I've run some backtests today and they all get out at 141 bars (day after the 140 default setting above). So, this is the proper way. I hope that helps. Chris - Original Message - From: rise_t575 To: amibroker@yahoogroups.com Sent: Thursday, April 15, 2010 1:51 PM Subject: [amibroker] Re: Sell ApplyStop Chris, As the Sell array can only contain 0 or 1 (False or True), I figured that True would be completely wrong as I don't want an exit signal on every bar. So, that just leaves False as the solution... and it seems to work. But I am not really sure if this is the proper way to do it... --- In amibroker@yahoogroups.com, Chris DePuy cde...@... wrote: rise, I'm literally working with this same thing now. yes, you have to tell amibroker to put a 0 in each of the Sell array locations, otherwise it will sell. but, if you don't put a value in there, the backtester won't work. Chris - Original Message - From: rise_t575 To: amibroker@yahoogroups.com Sent: Thursday, April 15, 2010 1:19 PM Subject: [amibroker] Sell ApplyStop Hello, I guess I have a small problem with understanding the ApplyStop function. If I want to use the stop defined by the ApplyStop function as my only stop (e. g. stopTypeNBar for exiting after n days), the backtester still wants some condition for the Sell array (sell = ...), although I don't need another condition for selling. Is it correct in this case to assign just a False to the Sell array? Seems a bit strange to me... Sell = False; ApplyStop(stopTypeNBar, ...); Thanks in advance!
[amibroker] virtualbox
has anyone used (XP on XP) virtualbox and run amibroker in it? I'm trying and i'm getting amibroker hanging up after about 1-2 minutes on backtesting.
Re: [amibroker] Can Zig function be used in a system?
The way I have seen it explained is you would use zig to determine what perfect performance would be. Then compare it to your system that you are testing that does not use zig. The timeframes used in zig should be similar to those in your other system. - Original Message - From: Tony M To: amibroker@yahoogroups.com Sent: Monday, April 12, 2010 6:09 PM Subject: [amibroker] Can Zig function be used in a system? I am new to Amibroker and I read from the Amibroker UserGuide that the Zig function may looking into the future. Does this mean the Zig function can not be used for any trading system? And how do I know if the Zig function is skewing the backtesting result? Thanks, Tony
[amibroker] odbc date
I am trying to write a date into SQL in .afl using odbcExecuteSQL command. I cannot recall an easy way to do this unless I were to use string manipulation. Is there an easy way to complete the DATE-GOES-HERE part of my second insert command? The following works great, except it doesn't include date: odbcExecuteSQL(INSERT INTO trades (price,SYMBOL) VALUES( '+C+','+Name()+' )); I want odbcExecuteSQL(INSERT INTO trades (DATE,price,SYMBOL) VALUES (?DATE-GOES-HERE?? '+C+','+Name()+' ));
Re: [amibroker] Amiquote registered version
what is the advantage of buying the registered version? I am new to amibroker (pro) version, so please excuse dumb questions. Hi Patrick, Very well formulated reply. However it does not answer the original question, and appears to be a knee jerk reaction. I too wondered sometimes about the same issue, and was looking for a reply from TJ. I'm a licensed, registered user of Amibroker, and use the solely the FastTrack database However, the program came with the Amiquote downloader, which appears (at least for me as an Amibroker licensed user) to be fully functional. I must admit I've only tried it a couple of times for odd ball equities, and not recently, so I may be wrong. At one point something was mentioned that Amiquote ONCE REGISTERED had the added functionality of fundamental data, and 'other' features. Since I never really planned to use Amiquote I never bothered to ask TJ or in a forum, however, this thread piqued my interest. So.. As a registered user of Amibroker PRO, what extra features are made available with a licensed version? Cheers, but confused? -= Chris ß =-
Re: [amibroker] Amiquote registered version
Ummm - I'm confusing myself when I read my own message. The REAL issue is Amiquote, NOT Amibroker. In the subject matter the original writer is asking about Amiquote, and what is gained by registering the program? I guess 'ass'uming that he/she paid for one of the Amibroker version, and would like to know what EXTRA features become available with a registered version of Amiquote IF you are already a registered user of Amibroker. This licensing stuff is becoming unbearable with all the vendors - lite, pro, super, extended, enhanced, premiere, home version, Enterprise. just to name a few from versions of software I have and change on the whim of authors (does not apply to TJ... he honestly names his products g).
Re: [amibroker] Amiquote registered version
I think TJ needs to add a little addendum, so that it is clearer as to what features are enabled once Amiquote is registered. FWIW, yesterday I was told I just won a contest giving me a 6 month subscription to Worden Telechart Gold, which writes/exports to Metastock format, so now I'm wiping off the dust on Amiquote to use as a two step process, as Worden has opne/high/low/close/volume data (FT does not). Today I played all day with Telechart, and tried the Telechart Metastock Amiquote Amibroker routine we'll see. I'm new at this routine. BTW, Worden - for others that read this, as a neat www.freestockcharts.com web page. Amazing what they can do today. Cheers from NJ.
Re: [amibroker] Amiquote registered version
Thank you Patrick. still a 24hr+ newbie at this TC stuff great hint. This is were they get you... free for 6 months, and after the learning curve you are hooked! I think Bill G had the right idea when he gave away v1.0 at PC clubs (via lottery), saved paying a salesman g. Again thank you for the hint. -= Chris =-
Re: [amibroker] Re: Wall Steet Journal on System Investing
Glad you are doing some validation I'l be interested in your analysis. FWIW, the WSJ is now part of News Corp, or Fox As Alexander Elder mentions in his book, they cater to the crowd and we know about the crowd.
Re: [amibroker] windows 7 64-bits
This is the BIG issue introduced with Vista. Either turn off User Account Control, or run the program as Administrator. I think this feature was in XP Pro, but turned off by default, in Vista, it was turned on by default, hence the shock to new users. Go to [Control Panel][User Account] and turn off User Account Control. Albeit, some rogue program could execute an exe file without your authorization. BUT if you turn that off, you are now more in an XP world. Otherwise, and maybe the safer mode, is to execute the program in Administrator mode, which in effect YOU are, as this is a PC at home, and not in a public office environment. Do look at Total Commander as an Explorer replacement, and check the boxes under properties to [X] Run as Admin Your choice. All 32 bit applications do go by default to the x86 program folder on a 64 bit system. Comments? - Edward Pottasch wrote: I received the 64-bits version of Windows 7 on a new computer. Installed Amibroker up to 5.2 (32 bits version) and want to install the latest beta now. Go to the devlog page and download the latest beta. The run it. It starts off asking to extract it in C:\Program Files (x86)\Amibroker
Re: [amibroker] Howard Bandy's trading system development speech at ATAA -- DVD
Hi Mr. Bandy, As the purchasers of your two books, and having met you at the last FT Seminar, I just ordered your generous sharing offer of the DVD. I look forward to seeing your presentation. Cheers, -= Chris =- - howardbandywrote: As many of you know, I was one of the speakers at the Australian Technical Analyst's Association (ATAA) National Conference in Melbourne in October 2009. The title of my speech was Trading System Development to Profit in All Markets. snip
Re: [amibroker] Amibroker Trojan????
Ah! so a 'copy' was run... Methinks you watch too much 'Fox News' vbg. - frankphd_us wrote: snip ... But through this amibroker trojan I am unable to access amibroker on any of my machines. snip ... That -maybe- was my mistake, somebody might have run an illegal copy off his stick on my machines. But that was sometime ago. Now the amibroker trojan is phoning home and blocking my machine. A little packet sniffer would reveal the truth. Methinks you watch too much 'Fox News' vbg.
RE: [amibroker] Re: Best Backup software
Dunno, but I've used several other packages before True Image, and True Image was the only one that restore correctly. 'been a TI user for over 5 years. No failure yet. I do upgrade when they release a new version. Data Time is money, no sense being cheap here. On that note, I'll mention that Drobo is about the most insecure storage media. Great idea, bad implementation. Guaranteed to fail to day you need it most. I'm looking for a good RAID 5 NAS.
Re: [amibroker] Re: Portfolio Manager ...
Look at Fund Manager from www.beiley.com - schnitt_tt schnitt...@yahoo.de wrote: Hi, let`s have a look at StatorFM .
Re: [amibroker] Plugin for Yahoo Streaming Quotes Into Amibroker
Ronald, your message fonts make it very difficult to read, due to the micro windows forced upon me by my ISP's advertising. Maybe we could abide by a conventional standard? - Ronald Davis xok...@yahoo.com wrote: I have decided to try daytrading, so now I need to pay for a streaming realtime data source for Amibroker, and I would like for it to be PAID Yahoo streaming realtime. I developed a custom indicator using Yahoo EOD data that uses the last 29 days of Yahoo data. Additionally, his indicator does 29 calculations on EACH of these 29 EOD bars. Volume is NOT used, and data ACCURACY is not very important due to the massive amount of smoothing and resmoothing of the data. I saw posts on http://www.onlyperceptions.co.cc/ for a plugin that down loads streaming data from http://www.money.rediff.com . However,the money.rediff website does not work. I would appreciate hearing about any discussions of TJ adding a plugin for YAHOO streaming realtime data. Additionally, are any programmers on this board interested in developing a plugin for this paid Yahoo streaming data. Ron D PS, I saw this post below by TJ indicating that AMIQUOTE is not capable of this. --- For RT Quote window you need a real-time streaming data source plugin (like eSignal plugin) AmiQuote is a stand alone application that provides snapshot, 20 min delayed data fed by regular ASCII importer. Best regards, Tomasz Janeczko amibroker.com
[amibroker] Formula based sell alert
Hi all Tomasz was good enough to give me this formula for me to use , could either Tomasz or someone modify this formula to a sell alert. Where I can put in the price for a stock and when it falls through that price the alert will show when I run the formula. I know this is very simple stuff for most but to me it would be very much appreciated. Chris switch( Name() ) { case BBI: Buy = Cross( C, 0.62 ); break; case CEY: Buy = Cross( C, 2.0 ); break; case COU: Buy = Cross( C, 1.06 ); break; }
[amibroker] Re: Formula Based Alerts
I would like to thankyou Tomasz and Andrew for your reply Chris --- In amibroker@yahoogroups.com, Tomasz Janeczko gro...@... wrote: switch( Name() ) { case BBI: Buy = Cross( C, 0.62 ); break; case CEY: Buy = Cross( C, 2.0 ); break; case COU: Buy = Cross( C, 1.06 ); break; } Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Chris chris.sharei...@... To: amibroker@yahoogroups.com Sent: Thursday, April 02, 2009 1:00 PM Subject: [amibroker] Formula Based Alerts Hi everyone I am totally illiterate when it comes to putting formula together. So can someone help me. I have put this together but I am only receiving an alert for the last line , AMP. Can someone help please And is there a better and easer way of doing this Buy = Cross(C,062)AND Name ()==BBI; Buy = Cross(C,2.00)AND Name ()==CEY; Buy = Cross(C,1.06)AND Name ()==COU; Buy = Cross(C,8.90)AND Name ()==CTX; Buy = Cross(C,5.19)AND Name ()==RMD; Buy=Cross(C,1.70)AND Name ()==MAP; Buy = Cross(C,4.67)AND Name ()==AMP; Thanks Chris 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
[amibroker] Formula Based Alerts
Hi everyone I am totally illiterate when it comes to putting formula together. So can someone help me. I have put this together but I am only receiving an alert for the last line , AMP. Can someone help please And is there a better and easer way of doing this Buy = Cross(C,062)AND Name ()==BBI; Buy = Cross(C,2.00)AND Name ()==CEY; Buy = Cross(C,1.06)AND Name ()==COU; Buy = Cross(C,8.90)AND Name ()==CTX; Buy = Cross(C,5.19)AND Name ()==RMD; Buy=Cross(C,1.70)AND Name ()==MAP; Buy = Cross(C,4.67)AND Name ()==AMP; Thanks Chris
Re: [amibroker] get Buy/SELL fill px/per each orderID via ibcontroller ( 2 other questions...)
Hi timekeeper, a) Use AFL code b) getrtdata(bid) c) 1) delay will be what is in the AA Settings Trades window unless you say otherwise in the .afl c) 2) Yes, in the scenario you outlined, it would be. That is because you'd be calculating a value (the average) that uses hi and low from different time periods, and then plugging it in as, say, your entry price (you'd use buyprice syntax to do that). Chris - Original Message - From: timekeeper_origen To: amibroker@yahoogroups.com Sent: Monday, January 26, 2009 7:58 PM Subject: [amibroker] get Buy/SELL fill px/per each orderID via ibcontroller ( 2 other questions...) hi all! 2 naive questions from a new user: (a) i am working with ibcontroller and would like it to return from tws the BUY/SELL SHORT fill prices - per each orderID - so that i can later use these IDs as %gain triggers in conditional SELL/BUY TO COVER orders. what would i do within either (1) the AFL code using a pre-existing command, or (2) write a command in AFL, or (3) use the C++ DLL builder to achieve my goal somehow, or (4) some other workaround i don't know enough to inquire about? (b) how can i work with BID/ASK prices and sizes instead of OHLC or AVERAGE? (c) changing now for a moment to the amibroker backtest (rather than API) environment, if I use the default AFL trade delay setting is that default setting (in the AFL code NOT the GUI) set to (1) zero or a one? (2) if it is zero AND i want the average price as my fill price AND i get my buy signal at the END of the bar, am i backtesting a scenario that uses forward information??? - - in that i am modeling the acquisition of shares at a price (in this example the average price of the bar) that is chronologically prior to my knowing that i even have a signal and that i want to acquire shares at all? thks for your help, patience and grace when presented with questions from the naive among us - =--timekeeper
Re: [amibroker] Re: get Buy/SELL fill px/per each orderID via ibcontroller ( 2 other questions...)
Timekeeper, I'm having a bit of trouble seeing stuff I've written because I cannot log onto TWS (weekend rules). I don't think you can see the child orders of a parent. You'll probably have to use either: (a) separate orders, or (b) you'll have to retrieve the aggregate position from the account. In the case of (a): I think most of what you're trying to do is found in http://www.amibroker.com/at/ From example 2, (I haven't done this in a while, but I'm pretty sure you can use) OrderID = ibc.ModifyOrder( OrderID, Name(), BUY, 100,LMT, LastValue( C ) + 0.10, 0, Day, False ); And then, right afterwards StaticVarSetText(OrderID+Name(), OrderID); In the case of (b): Use GetPositionSize( string Ticker ) to determine share count. Chris - Original Message - From: timekeeper_origen To: amibroker@yahoogroups.com Sent: Saturday, January 31, 2009 4:44 PM Subject: [amibroker] Re: get Buy/SELL fill px/per each orderID via ibcontroller ( 2 other questions...) Hi Chris, Mucho appreciado on jumping to my rescue here. i didn't realize big hedge fund pros have time to participate much in usergroups! Anyway, all questions answered except in reference to (a) (b). What I still seem unable to find is the call function for getting the actual fillprice itself, not the current bid/ask quote, that would nomally be found on any garden variety post-execution confirmation. As i now understand it, admittedly quite sketchily, the aggregate position price is reported back per the parentID (i.e. the basis of the position) but not the per order basis as regards each orderID that reside within the umbrella parent aggregated position? As background: I am trying to deploy a beats VWAP accumulation strategy that requires I know the fillprice status (including fillprice itself, not just whether or not it got filled) of each individual unique order in the aggregated position. Therefore, retrieving this price swiftly is a priority - =--timekeeper --- In amibroker@yahoogroups.com, Chris DePuy cde...@... wrote: Hi timekeeper, a) Use AFL code b) getrtdata(bid) c) 1) delay will be what is in the AA Settings Trades window unless you say otherwise in the .afl c) 2) Yes, in the scenario you outlined, it would be. That is because you'd be calculating a value (the average) that uses hi and low from different time periods, and then plugging it in as, say, your entry price (you'd use buyprice syntax to do that). Chris - Original Message - From: timekeeper_origen To: amibroker@yahoogroups.com Sent: Monday, January 26, 2009 7:58 PM Subject: [amibroker] get Buy/SELL fill px/per each orderID via ibcontroller ( 2 other questions...) hi all! 2 naive questions from a new user: (a) i am working with ibcontroller and would like it to return from tws the BUY/SELL SHORT fill prices - per each orderID - so that i can later use these IDs as %gain triggers in conditional SELL/BUY TO COVER orders. what would i do within either (1) the AFL code using a pre-existing command, or (2) write a command in AFL, or (3) use the C++ DLL builder to achieve my goal somehow, or (4) some other workaround i don't know enough to inquire about? (b) how can i work with BID/ASK prices and sizes instead of OHLC or AVERAGE? (c) changing now for a moment to the amibroker backtest (rather than API) environment, if I use the default AFL trade delay setting is that default setting (in the AFL code NOT the GUI) set to (1) zero or a one? (2) if it is zero AND i want the average price as my fill price AND i get my buy signal at the END of the bar, am i backtesting a scenario that uses forward information??? - - in that i am modeling the acquisition of shares at a price (in this example the average price of the bar) that is chronologically prior to my knowing that i even have a signal and that i want to acquire shares at all? thks for your help, patience and grace when presented with questions from the naive among us - =--timekeeper
Re: [amibroker] Re: Metastock Scan
Thank for the link. Do let me know if successful, and is any glitches. -= Chris =- - ct1942 ct1...@yahoo.com wrote: Thank you very much, I will try this --- In amibroker@yahoogroups.com, Lester Vanhoff ebsn247...@... wrote: The code below will export AB data to one huge Mseod.csv file.
Re: [amibroker] Voice Conference Software
Won't skype support 24 users? I've used skype to conference in a smaller number, but it works great. - Original Message - From: Ed Fast To: amibroker@yahoogroups.com Sent: Wednesday, January 07, 2009 2:11 PM Subject: [amibroker] Voice Conference Software I have used Ventrilo in the past. Very reliable and dirt cheap. Requires a Ventrilo Server Service which runs about $5.00 a month for 10 users. Used by Gamers. You will find the Ventrilo Server Service is usually offered by sites with a bent for online gaming. Google it for all the info. Ed -- -- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 1/7/2009 8:49 AM
Re: [amibroker] Re: second() always return 0 on 1-minute bar....
Thanks BR. But this function is not solve the problem. As I mentioned on the original message: I know you can use Now() to return current system time and then get value of the second. But Now() is using your local system timestamp, not IQFeed timestamp. The issue is Now() is using local system time, but Second() (plus Hour(), Minute()) all using IQfeed time, which is not easy to sync with local system clock since it depends on lots of variables. It mentioned here: http://www.amibroker.com/iqfeed.html. last update time now uses IQFeed timestamp instead of local clock and this prevents chart refresh stall occuring sometimes when clock on local machine and on IQFeed end are not synced Thanks! - Original Message From: reinsley [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Monday, October 6, 2008 2:02:48 AM Subject: [amibroker] Re: second() always return 0 on 1-minute bar Hello, This function provided by ED Pottasch could be useful or adapted to your need... http://finance. groups.yahoo. com/group/ amibroker/ message/128577 BR --- In [EMAIL PROTECTED] ps.com, chris76721 chris76721@ ... wrote: Hello, I'm using 1-minute bar from IQFeed and would like to place a order *only* within first 3 seconds of the bar. I was wondering if anyone knows the best way to determine this? I tried this: if (LastValue(Buy) Second() 3) { // Enter long } However, the Second() always return 0 on 1-minutes bar :-( I know you can use Now() to return current system time and then get value of the second. But Now() is using your local system timestamp, not IQFeed timestamp. Thanks a lot for your help!
Re: [amibroker] Re: 4-MACD indicator/system
Hi Millowena Dick areehoi, I just did a little search in the afl library, but did not see the 'afl' code for the 4MACD. Any clue? Maybe it's hiding under another name. -= Chris =- - MillowenaJuno [EMAIL PROTECTED] wrote: Robert Cummings 4-MACD System this is Bob description on how to play his system. --- In amibroker@yahoogroups.com, areehoi [EMAIL PROTECTED] wrote: snip ... indicator/trading system? MACD was developed by Bob Cumming 3 or 4 years ago and is an extremely popular Indicator/System for TC 2000+ uses. It was coded for AB and can be found in the files section. snip A
Re: [amibroker] Re: 4-MACD indicator/system
- Joe Platt [EMAIL PROTECTED] wrote: I did copy the code that Henrik posted and also sent an email to Erik Hoyer requesting info on the MACDicator and whether it is still being marketed. thanks, Hi Joe, Did you see the my post from Jan 18, 2003 4MACD2.doc. There is some explanation there, but not the 12page 'special'. Keep posted. Cheers, -= Chris ß =-
Re: [amibroker] odbc mysql keeps asking for datasource
SS, I have experienced this problem. You might want to try shortening the ODBC call in the .afl so that it only includes DSN= (like: odbcOpenDatabase(DSN=Fundamentals); ). Just make sure you've tested the settings in the ODBC window in windows (if you're using windows) and that it works properly. I have found that when i include password, username, etc. in the .afl code, that it'll bring me to the windows screen where i have to click on System DSN tab. There ARE workarounds if you keep getting that screen (like vTask studio, etc.) but that is a bandaid. Chris - Original Message - From: sszretter To: amibroker@yahoogroups.com Sent: Saturday, September 20, 2008 4:56 AM Subject: [amibroker] odbc mysql keeps asking for datasource I have installed the odbc dll's and set it all up and I am getting symbols and data via odbc to mysql into AB, but I am seeing that every time I launch AB or click ok out of the database settings window it is asking me to select the odbc connection. I have to click to machine source and select the odbc connection I made in xp. It works fine, but I am not sure why it has to pop-up every time...?
Re: [amibroker] strange error when doing odbc connectivity
3 things come to mind as possibilities: 1*you are retrieving an array, but maybe you only have one value? 2*you have a space after testtable 3*I don't know if you checked to see if the data made it into the table itself, but you might want to verify that at the (assuming you're using mysql): mysql select * from testtable; and see you you get anything. if there is nothing being successfully inserted into the databse, then it would register empty when you query it - Original Message - From: murthysuresh To: amibroker@yahoogroups.com Sent: Thursday, September 04, 2008 10:11 AM Subject: [amibroker] strange error when doing odbc connectivity i just inserted the data. i cannot retrieve it. it gives strange error if( NOT odbcExecuteSQL(INSERT INTO testtable (fieldone,somevalue) VALUES ( 'somevalue','+Name()+' )) ) { printf(INSERT failed with following message : +odbcGetLastError () ); } // this data is now inserted into the databse. i verified it. b=odbcGetArraySQL(SELECT fieldone from testtable ); WriteVal(b); printf(odbcGetLastError() ); i get the following error. it just inserted to the fieldone column. {EMPTY} Invalid field name or field index.
Re: [amibroker] Re: strange error when doing odbc connectivity
You don't have a date in your table. i've reviewed the source code for this plugin and worked with the .dll for a while now, and without a date you need to use odbcgetvalue instead of odbcgetarray. as a special note, you must use the date format called datetime with default -00-00 00:00:00 i'd recommend googling site:www.amibroker.com odbc and going to the odbc page that amibroker put together for this purpose. - Original Message - From: murthysuresh To: amibroker@yahoogroups.com Sent: Thursday, September 04, 2008 11:19 AM Subject: [amibroker] Re: strange error when doing odbc connectivity 1. there are lots of rows in that table. 2. i removed the space after testtable but does not change the result 3. following is the row count. mysql desc testtable; +---+-+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+-+--+-+-+---+ | somevalue | varchar(20) | YES | | NULL | | | fieldone | varchar(20) | YES | | NULL | | +---+-+--+-+-+---+ 2 rows in set (0.03 sec) mysql select count(*) from testtable ; +--+ | count(*) | +--+ | 2571 | +--+ 1 row in set (0.00 sec) --- In amibroker@yahoogroups.com, Chris DePuy [EMAIL PROTECTED] wrote: 3 things come to mind as possibilities: 1*you are retrieving an array, but maybe you only have one value? 2*you have a space after testtable 3*I don't know if you checked to see if the data made it into the table itself, but you might want to verify that at the (assuming you're using mysql): mysql select * from testtable; and see you you get anything. if there is nothing being successfully inserted into the databse, then it would register empty when you query it - Original Message - From: murthysuresh To: amibroker@yahoogroups.com Sent: Thursday, September 04, 2008 10:11 AM Subject: [amibroker] strange error when doing odbc connectivity i just inserted the data. i cannot retrieve it. it gives strange error if( NOT odbcExecuteSQL(INSERT INTO testtable (fieldone,somevalue) VALUES ( 'somevalue','+Name()+' )) ) { printf(INSERT failed with following message : +odbcGetLastError () ); } // this data is now inserted into the databse. i verified it. b=odbcGetArraySQL(SELECT fieldone from testtable ); WriteVal(b); printf(odbcGetLastError() ); i get the following error. it just inserted to the fieldone column. {EMPTY} Invalid field name or field index.
[amibroker] IQFeed Question
I've set up the IQ Feed using the instructions at http://www.amibroker.com/guide/h_iqfeed.html This setup allows up to 8 months of 5-min bars. On the IQ web site it says the 10 years of daily data is available - how can this be accessed by Amibroker? Thanks in advance, Chris.
Re: [amibroker] Amibroker Away From the Home
David, I'd suggest a three pronged approach: (a) set up amibroker on a desktop with a broadband connection and have it run; (a) use logmein.com free version to remotely access it when you use the laptop with wifi or dialup (alternatively gotomypc.com) (c) use shape services RDM+ to allow you to access the desktop remotely from your blackberry (uses fairly high amount of bandwidth) ** also, you can set up alerts that run every so often from your desktop that send emails of status to your blackberry mail (optional) This is what I've used for a long time and it is very stable. Chris - Original Message - From: David Weller To: amibroker@yahoogroups.com Sent: Friday, August 29, 2008 3:13 PM Subject: [amibroker] Amibroker Away From the Home The gist of these questions is that I want to use AmiBroker while travelling better than I am currently. I have an Antique Shop in Virginia near Williamsburg for the last 10 years. The last 2 have been slower (we are in a slight recession here especially for spendable cash purchases) - so I have been travelling more and enjoying the free time while it lasts. I often travel to go to auctions away from my business for a few days in length - so some way to keep AmiBroker running and working for me might be the ticket. I have 3 employees but the technical issues associated with all of this are too much for them to insure my financial programs are running correctly. The best I can expect from them is to turn on and off the computer and reboot. Currently I have a Laptop and Blackberry (limited minutes) that I use for a dial up modem when travelling or on the boat. Several times a day while travelling, I dial up the Internet and update AmiBroker database, run my routines, and make some orders. I then logoff and go buy some junk and may be away for a few hours. Sometimes when I repeat this process - I get unpleasant surprises after several hours with the market open. It would be nice to see alerts on my cell and have AmiBroker running at my business far away. Is there a better way? I have been using AmiBroker for the past 4 or 5 years. I have seen an Email recently (maybe from the Professor) that says he using a home computer to phone him up on a buy or sell action. Question 1: Maybe he is using this AFL Function AlertIF( Short, What Application is being used? Something in Outlook Perhaps.exe, Launching external application, 3 );). He then Dials into the Computer to verify things and finalize the transaction. Question 2: Would PC Anywhere work or is there something better. Slightly off topic here - but - This winter I will be traveling to Germany, Hungary, Poland, and Austria for business and skiing for a month. I lived in Germany for 5 years 1985-1990 before cell phones and this is my first trip back. I will have a cell that is usable in Europe - so I guess I will be able to update my AmiBroker on the Laptop like I am doing now. Of course I will be going to the pubs and coffee houses everyday and was wondering if they all have free WIFI. I have never been to Eastern Europe so I have no idea. Any help would be appreciated in steering me in the right direction. Best Regards Dave
Re: [amibroker] Re: The best way to help newbies, oldies, ... and AmiBroker ...
For those who don't know, you can use google.com to do searches of the word Tooltip found on www.amibroker.com (or other sites) by typing the following to the google search box: site:www.amibroker.com Tooltip This would result in a URL of http://www.google.com/search?hl=enq=site%3Awww.amibroker.com+Tooltipaq=foq= Best, Chris - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Thursday, August 28, 2008 12:59 PM Subject: Re: [amibroker] Re: The best way to help newbies, oldies, ... and AmiBroker ... Steve, THANK YOU very much. I could not express that better. I admit that organization of docs is lacking, but search is working and with a bit of patience, the information usually can be found relatively quickly. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Steve Dugas To: amibroker@yahoogroups.com Sent: Thursday, August 28, 2008 7:38 PM Subject: Re: [amibroker] Re: The best way to help newbies, oldies, and AmiBroker ... Hi - I wonder sometimes if people might expect to install AB in the morning, port all their stuff over in the afternoon, and be up and running with whatever they want the next day... Unlikely to happen, no matter how badly you want to get back to making money. If you were learning a foreign language ( French, Japanese, whatever ) you would probably give yourself a year or so to become proficient - why would you not expect to spend some serious time to become proficient in AFL? And of course, the more time and effort you put in, the quicker you will come up to speed. When I type tooltip into the search box, I get about 10 hits. Just going as far as the 2nd one I see Tooltip Allows you to define your own text for data tooltip Example: Tooltip = This is my tool tip text showing close price: + Close; That looks like a pretty basic and straightforward example... It doesn't take a huge leap of logic to think... Hmm, what would happen if I added + Open + High + Low? Then, what if I deleted the text part? If you are reading the docs you should probably come across the \n newline operator pretty quickly and then you will know how to stack them. There is no substitue for at least blowing through the entire user's guide, including all the individual functions - even a year later you will say to yourself I seem to remember reading something about this in the docs, I will try to search for it again When you see people like Graham, Herman, et al giving help over and over again, ask yourself How did they get so smart? The answer is, they got the basics from the docs, and then there is a lot of experimentation, trial and error involved sometimes to get exactly what you want.. TJ cannot possibly provide examples showing *exactly* how to do each and every idea that might pop into anyone's head. I can actually see why he gets frustrated when he *does* put examples like this right in the docs and people still say they have no help. I *have* read all the docs, and even review them once in a while to try and stay on top of new features. Once you do that, it is fairly easy to see who has put in their due dilegence and who hasn't... Steve - Original Message - From: lou To: amibroker@yahoogroups.com Sent: Thursday, August 28, 2008 11:58 AM Subject: Re: [amibroker] Re: The best way to help newbies, oldies, and AmiBroker ... Fred - If you'll pardon a beginner's comments, It really doesn't matter where Brian or Allan want to go only that they can go where ever they want. To do that they (and I) need to be able to find and understand the existing tools. To use the Tooltips example, I would not have been able to find the information given by TJ and would still be wondering why the check box didn't work (and still am). This has been a problem since the beginning of AB but the program itself changes so fast that by the time a manual is written, it is outdated. Don't know what the answer is, hope you do. Guess it is time for some creative thought. regards, lou howard === - Original Message - From: Fred Tonetti To: amibroker@yahoogroups.com Sent: Thursday, August 28, 2008 9:28 AM Subject: RE: [amibroker] Re: The best way to help newbies, oldies, ... and AmiBroker ... Brian / Allan, While I'm not particularly fond of answering questions with questions the reality is that in order for anyone to answer questions like the very general one you posted they'd need to know where it is you are trying to go . If you've read Howard's book and that isn't in the direction you want to go i.e. system design and testing then what direction do you want to go in ? Are you
Re: [amibroker] Re: Problem with multiple timeframe plots?
I have similar time frame code that is not working as expected...for a commentary run against an hourly chart... TimeFrameSet(inDaily); LongTermEMA = EMA(Close, 200); TimeFrameRestore(); TimeFrameSet(inHourly * 4); MediumTermEMA = EMA(Close, 200); TimeFrameRestore(); ShortTermEMA = EMA(Close, 200); WriteIf(1,Daily EMA,); WriteVal(TimeFrameExpand(LongTermEMA, inDaily)); WriteIf(1,4 Hourly EMA,); WriteVal(TimeFrameExpand(MediumTermEMA, inHourly * 4)); WriteIf(1,Hourly EMA,); WriteVal(TimeFrameExpand(ShortTermEMA, inHourly)); TimeFrameRestore(); The output is below (same values for all EMA's). Daily EMA 1.444 4 Hourly EMA 1.444 Hourly EMA 1.444 On 15 Jul 2008, at 11:49, tayamaan wrote: Hi, you will need to restore time-frame, after that timeframeExpand and lastly plotting. Cheers, Adrian --- In amibroker@yahoogroups.com, bilbo0211 [EMAIL PROTECTED] wrote: I am trying to plot a daily, weekly and monthly indicator (like Bollinger Bands) on one chart e.g., daily. Sample code: TimeFrameSet( inWeekly ); P = ParamField(Price field,-1); Periods = Param(Periods, 15, 2, 100, 1 ); Width = Param(Width, 2, 0, 10, 0.05 ); Color = ParamColor(Color, colorCycle ); Style = ParamStyle(Style); Plot( TimeFrameExpand(BBandTop( P, Periods, Width ),inWeekly), wBBTop + _PARAM_VALUES(), Color, Style ); Plot( TimeFrameExpand(BBandBot( P, Periods, Width ),inWeekly), wBBBot + _PARAM_VALUES(), Color, Style ); This plots something on the daily chart but it is clearly not the weekly BB I see on the weekly chart! Any suggestions on how to achieve my objective? Bill
Re: [amibroker] The Perfect (?!) AmiBroker Setup [ was Vista 64...]
Herman, i wanted to share my computer layout. Its quite different from the others I've seen posted and allows me to log into my system from nearly anywhere in the world. I read that you travel, so this might help you. 1) I use 4 computers. One for RT trading and RT data collection (currently the primary computer with 4 screens), one for EOD semi-automated trading, one for generating signals for the EOD trading system, one for studying things unrelated to the other 3. I have found that running more than one strategy on a single computer is a recipe for disaster. No matter how hard I tried to learn templates, databases, etc, eventually I'd have one interfere with the other and I'd be offline for 2 days getting back to the original setup. 2) I use WinXP and Windows Remote Desktop to the other 3 computers 3) I routinely access the primary computer using one of two DHCP-aware accross the Internet remote termininal viewers: gotomypc (I also use logmein.com as a backup) and RDM+ from shapeservices.com (this allows blackberry to view all 3 screens on my primary computer across wireless network). You must use Win Remote Desktop if you want to see all the computers from a hotel room or your blackberry. 4) The reason I don't use KVMs is because I need to be able to see all the computers from remote locations using the programs in 3) above 5) Also, I use a simple backup software called SyncBack. Its by 2BrightSparks (www.2brightsparks.com) and it does backups at different times of the day. Best, Chris - Original Message - From: Herman To: amibroker@yahoogroups.com Sent: Saturday, July 12, 2008 5:18 PM Subject: Re: [amibroker] The Perfect (?!) AmiBroker Setup [ was Vista 64...] Loss of data can have long lasting consequences. Often one doesn't miss data (any type) until months later - this happend a number of times to me... I am now careful not to delete old backup files to quickly. Off site (internet) is also an alternative; is cheap but slow. If you belong to a trading team your partners who keep their own backups they will always have a copy of the latest code ;-) I also have an external USB drive for separate backup. I use Acronis True Image Home for external backups. Today I added an extra 500 Gbyte hard disk and plan to create several levels of backup partitions, i.e. instead of using tradional disk images I will use fully functional partitions for backup. This alllows me to restore my computer with a single mousclick: instantly. I expect this will save me a significant amount of time. I will download/test the Acronis Disk Director Suite tomorrow. Thanks, herman - Original Message - From: J. Biran [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Saturday, July 12, 2008 1:59 PM Subject: RE: [amibroker] The Perfect (?!) AmiBroker Setup [ was Vista 64...] For redundancy I use an external eSATA drive that is always switched off, except briefly when used. I manually copy onto it Norton Ghost images (that are created on my normal RAID1 drives) as a second layer of protection. This is not excessive paranoia, I have a friend whose computer power supply failed, and blew up the motherboard and ALL his hard disks! Data recovery services are REALLY expensive, with little guarantee of success. p.s. Outlook thinks you meant to say culpa below :) Joseph Biran -Original Message- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dingo Sent: Saturday, July 12, 2008 6:54 AM To: amibroker@yahoogroups.com Subject: RE: [amibroker] The Perfect (?!) AmiBroker Setup [ was Vista 64...] A cupla things to consider: 1. I have multiple computers as well. a. My main computer is a workstation with 3 monitors 1 very fast hard disk drive (raptor) and its where I do most of my work. All of the monitors have both DVI and VGA connectors. I use the DVI to connect to this workstation. b. Another workstation is used as a Media Center. It has a video card that has both DVI and VGA. I use the right most monitor from a to attach to b via the VGA port. I use a free program Synergy to allow me to use my single mouse and keyboard on machine a to work on machine b. I just click the source button on the shared monitor to switch from DVI (connected to machine a) to VGA (connected to machine b). Synergy then allows me to move my mouse to the right and voila it shows up on the vga'd monitor and I'm on machine b just as if my mouse, keyboard were attached to it. It's a virtual KVM and uses the LAN that both a and b are on. c. A notebook for travel. I also use Synergy on this machine. It just turn it on and if Need to work on it I just scroll my mouse all the way to the left and it treats the notebook
Re: [amibroker] Re: Newbie Custom Indicator Question
thanks, this did the trick. I was keen to get going without reading the details of the manual!! On 11 Jul 2008, at 12:43, progster01 wrote: --- In amibroker@yahoogroups.com, cgrafham [EMAIL PROTECTED] wrote: I am having difficult using this indicator as part of system written in a different formula file in the Systems folder. I get a syntax error when using the below: Buy = ElderBullPower(20) 0; It appears that the function is not known. This is my attempt at wriing a custom indicator and using it as part of system, so I'm sure I'm missing something fundemental... Can any one see a problem? Offhand, it seems likely that the help page for #include would shed light on this for you.
Re: [amibroker] [OT] XP Professional vs Vista 64
Hi Herman I am running Vista64 on an ASUS M2A M/B 3GHz AMD64x2 It is fine except one of my other trading programs crashes during a symbol update too often to be able to use. I have two other problems, one is that since installing 4GB Ram (previously 2GB) Vista64 will not allow me to configure Hibernation, only sleep mode. I'm using the 32bit version of Amibroker as I haven't sent a request in to get a 64bit key. It works fin. I also tried XP64 but it would not load USB drivers for my M/B. I gave up with XP64. XP32 is fine but not as good with disk I/O or multitasking as Vista. I have considered switching to Vista32 to test the other application's stability but it is so much time and effort, I've lost interested with continued testing and re building. I should allocate more time to trading (and making money) regards Shawky
Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ?
Elizabeth, the short answer is yes. It requires that you call out parameters that are specific to the ticker for each iteration the array processor goes through. So, you'd do something like this for each ticker: if (Name()==AAPL) { period=Optimize(period,53,5,100,8); } - Original Message - From: Elizabeth Kennedy To: amibroker@yahoogroups.com Sent: Wednesday, July 09, 2008 11:45 PM Subject: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Hello All, I would greatly appreciate if someone can tell me wheather it is possible to optimize a basket of stocks at individual stock level using Amibroker. ie. to get separate optimal parameters for each stock in the basket. Thanks in advance Elizabeth
Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ?
dingo, I don't think it'll produce a neat output as I had written it, no. I haven't done this type of thing in a while, but when I did I recall running each test separately for each ticker and then scrolling to the right to read the report. Creating a .js script that would call each ticker separately and then save the results to a .csv file is one possible solution. I cannot figure out how to get Amibroker to scroll through the list of stock tickers in a watchlist using the Stock object and then how to rename the report.csv to ticker.csv below. Besides that, this should work. (One note, a wild way to do this would be to have a separate .tls file for each stock and then have amiquote retrieve each .tls file in a directory using Example 2 in http://www.amibroker.com/guide/objects.html ). If someone wants to chime in here and help with these outstanding issues, that'd be nice. /Amibroker open to database***/ AB = new ActiveXObject(Broker.Application); AB.LoadDatabase(C:\\Program Files\\Amibroker\\Big); AB.Visible = true; /* retrieve automatic analysis object */ AA = AB.Analysis; /* here is where you'd call the ticker name*/ /* load formula from external file */ AA.LoadFormula(Formulas\\Custom\\yourfilename.afl); /* optional: load settings */ // AA.LoadSettings(the_path_to_the_settings_file.abs); /* set apply to and range */ AA.ApplyTo = 2; // use current stock AA.RangeMode = 1; // use all available quotes AA.RangeN = 1; /* run explore and display report */ AA.Optimize(); //I cannot remember whether you put a 2 or something else in here; recent beta docs say something about this, i think AA.Export(C:\\report.csv); //you'd ideally change this name to the ticker name /Amibroker Save Database***/ AB.SaveDatabase(); /Amibroker Save Database (end)***/ AB.Quit(); - Original Message - From: dingo To: amibroker@yahoogroups.com Sent: Thursday, July 10, 2008 12:23 PM Subject: RE: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Are you sure that the individually optimized params will appear on the resultant report? d From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Thursday, July 10, 2008 3:17 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Elizabeth, the short answer is yes. It requires that you call out parameters that are specific to the ticker for each iteration the array processor goes through. So, you'd do something like this for each ticker: if (Name()==AAPL) { period=Optimize(period,53,5,100,8); } - Original Message - From: Elizabeth Kennedy To: amibroker@yahoogroups.com Sent: Wednesday, July 09, 2008 11:45 PM Subject: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Hello All, I would greatly appreciate if someone can tell me wheather it is possible to optimize a basket of stocks at individual stock level using Amibroker. ie. to get separate optimal parameters for each stock in the basket. Thanks in advance Elizabeth
Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ?
d, I've been on this wild goose chase, as I had said in the email below. Would you care to shed some light on how to script this? - Original Message - From: dingo To: amibroker@yahoogroups.com Sent: Thursday, July 10, 2008 1:18 PM Subject: RE: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? I've already got a script to do the job. Just wanted to make sure you weren't sending someone off on a wild goose chase. d From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Thursday, July 10, 2008 4:14 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? dingo, I don't think it'll produce a neat output as I had written it, no. I haven't done this type of thing in a while, but when I did I recall running each test separately for each ticker and then scrolling to the right to read the report. Creating a .js script that would call each ticker separately and then save the results to a .csv file is one possible solution. I cannot figure out how to get Amibroker to scroll through the list of stock tickers in a watchlist using the Stock object and then how to rename the report.csv to ticker.csv below. Besides that, this should work. (One note, a wild way to do this would be to have a separate ..tls file for each stock and then have amiquote retrieve each .tls file in a directory using Example 2 in http://www.amibroker..com/guide/objects.html ). If someone wants to chime in here and help with these outstanding issues, that'd be nice. /Amibroker open to database***/ AB = new ActiveXObject(Broker.Application); AB.LoadDatabase(C:\\Program Files\\Amibroker\\Big); AB.Visible = true; /* retrieve automatic analysis object */ AA = AB.Analysis; /* here is where you'd call the ticker name*/ /* load formula from external file */ AA.LoadFormula(Formulas\\Custom\\yourfilename.afl); /* optional: load settings */ // AA.LoadSettings(the_path_to_the_settings_file.abs); /* set apply to and range */ AA.ApplyTo = 2; // use current stock AA.RangeMode = 1; // use all available quotes AA.RangeN = 1; /* run explore and display report */ AA.Optimize(); //I cannot remember whether you put a 2 or something else in here; recent beta docs say something about this, i think AA.Export(C:\\report.csv); //you'd ideally change this name to the ticker name /Amibroker Save Database***/ AB.SaveDatabase(); /Amibroker Save Database (end)***/ AB.Quit(); - Original Message - From: dingo To: amibroker@yahoogroups.com Sent: Thursday, July 10, 2008 12:23 PM Subject: RE: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Are you sure that the individually optimized params will appear on the resultant report? d From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Thursday, July 10, 2008 3:17 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Elizabeth, the short answer is yes. It requires that you call out parameters that are specific to the ticker for each iteration the array processor goes through. So, you'd do something like this for each ticker: if (Name()==AAPL) { period=Optimize(period,53,5,100,8); } - Original Message - From: Elizabeth Kennedy To: amibroker@yahoogroups.com Sent: Wednesday, July 09, 2008 11:45 PM Subject: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? Hello All, I would greatly appreciate if someone can tell me wheather it is possible to optimize a basket of stocks at individual stock level using Amibroker. ie. to get separate optimal parameters for each stock in the basket. Thanks in advance Elizabeth
Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ?
Dale and Elizabeth, I think these two script and afl examples should do the trick. The core of the .js file I started with appears to draw from some of Dale's work posted here in 2006 (I infer that from a comment Joe Landry made when he posted his export .png script). There is one thing missing from my understanding of this script and I just ran out of time. For some reason, when I type in iWatchlist = 13, this thing operates on my List 44. I have no idea why, but the solution is to put the tickers you want into List 44. I'm sure with some time this can be solved. Best regards 1) call this file name optimize.js /Amibroker open to database***/ AB = new ActiveXObject(Broker.Application); AB.LoadDatabase(C:\\Program Files\\Amibroker\\Big); AB.Visible = true; AA=AB.Analysis; iWatchList = 13; Qty = AB.Stocks.Count; for( i = 0; i Qty; i++ ) { Stk = AB.Stocks( i ); if( iWatchList 1 ) { if( Stk.WatchListBits ( 1 iWatchList ) ) { Doc = AB.Documents.Open( Stk.Ticker ); WScript.Sleep( 4000 ); // 4 seconds delay /* load formula from external file */ AA.LoadFormula(Formulas\\Custom\\Optimization example\\optimization single stock example.afl); /* optional: load settings */ // AA.LoadSettings(the_path_to_the_settings_file.abs); /* set apply to and range */ AA.ApplyTo = 1; // use current stock AA.RangeMode = 0; // use all available quotes //AA.RangeN = 1; /* run explore and display report */ AA.Optimize(); //I cannot remember whether you put a 2 AA.Export(C:\\+Stk.Ticker + .csv); //you'd ideally change this name to the ticker name Doc.Close(); } } else { if( Stk.WatchListBits2 ( 1 ( iWatchList - 1 )) ) { Doc = AB.Documents.Open( Stk.Ticker ); /* load formula from external file */ AA.LoadFormula(Formulas\\Custom\\Optimization example\\optimization single stock example.afl); /* optional: load settings */ // AA.LoadSettings(the_path_to_the_settings_file.abs); /* set apply to and range */ AA.ApplyTo = 1; // use current stock AA.RangeMode = 0; // use all available quotes //AA.RangeN = 1; /* run explore and display report */ AA.Optimize(); //I cannot remember whether you put a 2 AA.Export(C:\\+Stk.Ticker + .csv); //you'd ideally change this name to the ticker name Doc.Close(); } } } 2) call this file c:\program files\amibroker\Formulas\Custom\Optimization example\optimization single stock example.afl per1=Optimize(per1,50,20,100,10); per2=Optimize(per2,50,20,100,10); Buy = Cover= Cross(MA(C,per1),MA(C,per2)); Sell = Short = Cross(MA(C,per2),MA(C,per1)); - Original Message - From: dingo To: amibroker@yahoogroups.com Sent: Thursday, July 10, 2008 1:38 PM Subject: RE: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? contact me off line. d From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Thursday, July 10, 2008 4:28 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? d, I've been on this wild goose chase, as I had said in the email below. Would you care to shed some light on how to script this? - Original Message - From: dingo To: amibroker@yahoogroups.com Sent: Thursday, July 10, 2008 1:18 PM Subject: RE: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? I've already got a script to do the job. Just wanted to make sure you weren't sending someone off on a wild goose chase. d From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Thursday, July 10, 2008 4:14 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Optimization of basket of stocks at individual stock level - possible with Ami ? dingo, I don't think it'll produce a neat output as I had written it, no. I haven't done this type of thing in a while, but when I did I recall running each test separately for each ticker and then scrolling to the right to read the report. Creating a .js script that would call each ticker separately and then save the results to a .csv file is one possible solution. I cannot figure out how to get Amibroker to scroll through the list of stock tickers in a watchlist using the Stock object and then how to rename the report.csv to ticker.csv below. Besides that, this should work. (One note, a wild way to do this would be to have a separate ..tls file for each stock and then have amiquote retrieve each .tls file in a directory using Example 2 in http://www.amibroker..com/guide/objects.html ). If someone wants to chime in here
Re: [amibroker] Re: Code help please... Optimize with CMAE
Bruce or Tomasz, how do i set the objective function to objective? I am using 5.14. Even though the output in the AA window shows objective as a column and it computes its value, the Optimization does not seek to the objective called objective even when I type it into the box in AA/Backtester settings/Walk-Forward/Optimization Target. Thanks - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 9:00 AM Subject: Re: [amibroker] Re: Code help please... Optimize with CMAE Nice :-) Best regards, Tomasz Janeczko amibroker.com - Original Message - From: bruce1r [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 5:51 PM Subject: [amibroker] Re: Code help please... Optimize with CMAE Dennis - I don't post here much, but was about to post something else and saw this. Sometimes I can't resist a challenge. It looks like you want to experiment with CMAE as a general purpose function optimizer. First, I concur with others - the best way is to write a DLL. But, if you just want to play ... Warning, this is a hack - and hack is not being used in the good way here. But it will allow you to play. 1. Setup AA to current symbol and set the Optimization target to objective in AA Settings / Walk-Forward 2. Optimize the following code. It is set for CMAE, but you might also find the commented out SPSO interesting. I've also done my best to re-express your objective function to what I think you meant. Check the comments. _ //REMEMBER - Set the Optimization target to objective in AA Settings / Walk-Forward //OptimizerSetEngine( spso ); //OptimizerSetOption( Runs, 2 ); //OptimizerSetOption( MaxEval, 1000 ); OptimizerSetEngine(cmae); X = Optimize( X, 1, 1, 100, 0.1 ); Y = Optimize( Y, 1, 1, 100, 0.1 ); Buy = Sell = Short = Cover = 0; SetOption(UseCustomBacktestProc, True ); if ( Status( action ) == actionPortfolio ) { bo = GetBacktesterObject( ); bo.Backtest( ); // The original goal appeared to be to minimize the error of 100 - X*Y, // AND to minimize the difference between X and Y. In other words, a // result of X=10 and Y=10. // Note that this must be expressed as an objective to be maximized. Objective = - abs( 100 - X * Y ) - abs( X - Y ); bo.AddCustomMetric( objective, Objective ); } _ It should be obvious how to setup any parameters and an objective. Hack doesn't seem strong enough, but it was an interesting diversion. -- Bruce --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, In that case just look at the CMAE docs (the read me is inside cmaes) If this is too complicated, you may need to use SciLab for example www.scilab.org Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Dennis Brown To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 4:46 PM Subject: Re: [amibroker] Code help please... Optimize with CMAE Thank you both for continuing to provide help. I really do not need to solve an exhaustive search for two variables with a simplistic objective. I really need to solve problems that have many variables and a very complex objective formula that is not suitable for an exhaustive search. I only provided this simplest of all cases so the the problem would not get in the way of my question of how to connect this simple case to the CMAE engine. If that is too complicated to address on this list, then I will have to look elsewhere for help. Again, thank you for your responses, Dennis On Jul 7, 2008, at 9:19 AM, Tomasz Janeczko wrote: Hello, Here is the simplest exhaustive search sample: function Objective( x, y ) { return sin(x) * cos(y); } xmin = 0; xmax = 100; xstep = 1; xbest = Null; ymin = 0; ymax = 100; ystep = 1; ybest = Null; best = -1e9; for( x = xmin; x = xmax; x += xstep ) for( y = ymin; y = ymax; y += ystep ) { f = Objective( x, y ); if( f best ) { best = f; xbest = x; ybest = y; } } printf(Best f = %g, at x = %g, y = %g, best, xbest, ybest ); Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Paul Ho To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 2:29 PM Subject: RE: [amibroker] Code help please... Optimize with CMAE I think using an exhaustive search would be a way to start. since you only have 2 parameters, you can also put a little bit of smart in there yourself. for example, if X*Y == 100 or close to that. there can be a constraint in place
Re: [amibroker] Re: Code help please... Optimize with CMAE
Tomasz, thank you. I was typing Objective, not objective. This is case sensitive, apparently. Chris - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 1:00 PM Subject: Re: [amibroker] Re: Code help please... Optimize with CMAE Hello, AA, Settings, Walk-Forward : type-in manually into Optimization Target field. Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Chris DePuy To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 8:38 PM Subject: Re: [amibroker] Re: Code help please... Optimize with CMAE Bruce or Tomasz, how do i set the objective function to objective? I am using 5.14. Even though the output in the AA window shows objective as a column and it computes its value, the Optimization does not seek to the objective called objective even when I type it into the box in AA/Backtester settings/Walk-Forward/Optimization Target. Thanks - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 9:00 AM Subject: Re: [amibroker] Re: Code help please... Optimize with CMAE Nice :-) Best regards, Tomasz Janeczko amibroker.com - Original Message - From: bruce1r [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 5:51 PM Subject: [amibroker] Re: Code help please... Optimize with CMAE Dennis - I don't post here much, but was about to post something else and saw this. Sometimes I can't resist a challenge. It looks like you want to experiment with CMAE as a general purpose function optimizer. First, I concur with others - the best way is to write a DLL. But, if you just want to play ... Warning, this is a hack - and hack is not being used in the good way here. But it will allow you to play. 1. Setup AA to current symbol and set the Optimization target to objective in AA Settings / Walk-Forward 2. Optimize the following code. It is set for CMAE, but you might also find the commented out SPSO interesting. I've also done my best to re-express your objective function to what I think you meant. Check the comments. _ //REMEMBER - Set the Optimization target to objective in AA Settings / Walk-Forward //OptimizerSetEngine( spso ); //OptimizerSetOption( Runs, 2 ); //OptimizerSetOption( MaxEval, 1000 ); OptimizerSetEngine(cmae); X = Optimize( X, 1, 1, 100, 0.1 ); Y = Optimize( Y, 1, 1, 100, 0.1 ); Buy = Sell = Short = Cover = 0; SetOption(UseCustomBacktestProc, True ); if ( Status( action ) == actionPortfolio ) { bo = GetBacktesterObject( ); bo.Backtest( ); // The original goal appeared to be to minimize the error of 100 - X*Y, // AND to minimize the difference between X and Y. In other words, a // result of X=10 and Y=10. // Note that this must be expressed as an objective to be maximized. Objective = - abs( 100 - X * Y ) - abs( X - Y ); bo.AddCustomMetric( objective, Objective ); } _ It should be obvious how to setup any parameters and an objective. Hack doesn't seem strong enough, but it was an interesting diversion. -- Bruce --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, In that case just look at the CMAE docs (the read me is inside cmaes) If this is too complicated, you may need to use SciLab for example www.scilab.org Best regards, Tomasz Janeczko amibroker.com - Original Message - From: Dennis Brown To: amibroker@yahoogroups.com Sent: Monday, July 07, 2008 4:46 PM Subject: Re: [amibroker] Code help please... Optimize with CMAE Thank you both for continuing to provide help. I really do not need to solve an exhaustive search for two variables with a simplistic objective. I really need to solve problems that have many variables and a very complex objective formula that is not suitable for an exhaustive search. I only provided this simplest of all cases so the the problem would not get in the way of my question of how to connect this simple case to the CMAE engine. If that is too complicated to address on this list, then I will have to look elsewhere for help. Again, thank you for your responses, Dennis On Jul 7
Re: [amibroker] Re: Using fundamental data
No, Amibroker does not store historical fundamental data. You either need to: (a) store it yourself (this can be done using .csv, sql, Amibroker notepad and running a scan frequently), or (b) paying a quality service provider to gather data for you to access - There are companies that have billions of revenue (Thomson, IDC, etc) all of which do this. Either way, you pay in time or currency. But, for what its worth, I've found several decent trading and investing strategies that use fundamentals (and other data that is unrelated to price and volume). So, it might be worth it - Original Message - From: droskill To: amibroker@yahoogroups.com Sent: Wednesday, June 18, 2008 11:58 AM Subject: [amibroker] Re: Using fundamental data I understand how to access it - my question was this: does AB access the information historically? Meaning, if I look back in time to two years ago, will I have the EPS for the this quarter (Q2 2008) or for two years ago (Q2 2006)? --- In amibroker@yahoogroups.com, Chris DePuy [EMAIL PROTECTED] wrote: http://www.amibroker.com/guide/h_fundamental.html So, lets say you wanted to buy when EPS is above 1.00, you'd say: myeps = getfndata(eps); buy = myeps 1; - Original Message - From: droskill To: amibroker@yahoogroups.com Sent: Monday, June 16, 2008 6:40 AM Subject: [amibroker] Using fundamental data I was reading the documentation on using Fundamental data within AB - but I was unclear as to whether or not this information was available historically for use in the backtester - any help greatly appreciated!
Re: [amibroker] Working with Watchlists from AFL
Herman, I have found various ways to accomplish things similar to these, but I do not thing all of these will work from within AFL. At least, I don't know how to do them. So, for example, to erase what is already in, say, watchlist 19, 20 and 21, I've created this .js file (I attach the text below) that calls some .afl. You will notice that this code is very very similar to that posted by Tomasz on www.amibroker.com in the first place. I have not tried to do precisely the things you've asked for, but if its possible, I imagine you could start with this codebase and modify by using http://www.amibroker.com/guide/objects.html. You can also find more stuff at http://www.google.com/search?hl=enq=site%3Awww.amibroker.com+AB.analysis . FWIW, I use this script below every night and then using .afl I populate these 3 watchlists with new tickers that meet criteria I like. Hope this helps. remove.js /Amibroker open to database***/ AB = new ActiveXObject(Broker.Application); AB.LoadDatabase(C:\\Program Files\\Amibroker\\Big); AB.Visible = true; /* retrieve automatic analysis object */ AA = AB.Analysis; /* load formula from external file */ AA.LoadFormula(Formulas\\Custom\\Yahoo Fundamentals\\remove stocks from watchlist 19 - 21.afl); // AA.LoadSettings(the_path_to_the_settings_file.abs); AA.ClearFilters(); //AA.Filter( 0, market ) = 0; // uncomment line below to AA.Filter( 0, watchlist ) = 21; // include WL 21 /* set apply to and range */ AA.ApplyTo = 2; // use filters AA.RangeMode = 1; // use all available quotes AA.RangeN = 1; /* run explore and display report */ AA.Scan(); /Amibroker Save Database***/ AB.SaveDatabase(); /Amibroker Save Database (end)***/ AB.Quit(); //AQ.Quit(); remove stocks from watchlist 19 - 21.afl //removes all tickers in a watchlist 19 to 21 Filter=1; AddColumn(C,c,1.2); Buy=Sell=Cover=Short=0; for( wl = 19; wl 22; wl++ ) if(InWatchList(wl)) { CategoryRemoveSymbol( , categoryWatchlist, wl ); } - Original Message - From: Herman To: AmiBroker User Group Sent: Wednesday, June 18, 2008 6:57 AM Subject: [amibroker] Working with Watchlists from AFL Can someone point me to help/links on AFL programming with WatchLists? I can't seem to find much info about it anywhere. Is it possible to: 1) create WatchLists by name from AFL? 2) delete WatchLists by name from AFL? 3) and if so, how do I protect myself from overwriting an existing WL? 4) When creating a WatchList do I need to update the WL index file? 5) Can I create GLOBAL WatchLists? Are there any simple solutions for these tasks? I could write some complicated work-arounds but I don't want to waste a lot of time if a simple solution is available. Many thanks, herman
Re: [amibroker] Using fundamental data
http://www.amibroker.com/guide/h_fundamental.html So, lets say you wanted to buy when EPS is above 1.00, you'd say: myeps = getfndata(eps); buy = myeps 1; - Original Message - From: droskill To: amibroker@yahoogroups.com Sent: Monday, June 16, 2008 6:40 AM Subject: [amibroker] Using fundamental data I was reading the documentation on using Fundamental data within AB - but I was unclear as to whether or not this information was available historically for use in the backtester - any help greatly appreciated!
[amibroker] sigscaleout
I want to scale into positions and scale out of positions during the day, but at the end of the day, I'd like to blow out all longs and all shorts. Why does this not work?? Cond5 = Hour() 15 ; Buy = IIf(Buysignal AND NOT Hour() ==16,sigScaleIn,O); Short = IIf(Shortsignal,sigScaleIn,0); Cover=IIf(Buy ,sigScaleOut,IIf(Cond5,1,0)); Sell=IIf(Short,sigScaleOut,IIf(cond5,1,0));
Re: [amibroker] Adding data to field in existing symbol database.
Ken, I think you are asking whether you can add information to the Amibroker database that is not related to O,H,L,C,V, OI from a source that is different from Amiquote, right? If so, I'm afraid that ASCII import is probably your best bet. The way I've done that is to create a dummy ticker like a and then put information into the O array of a that relates to, say, bids and information into the H array of a for, say, asks. Then, in order to operate on this information, one relatively straightforward way is to use the Foreign command, like Foreign (a,O) when you need to retrieve bids. Or you could have amibroker retrieve these fields on demand (in your code) using fopen commands from a .csv format. or you could retrieve from .csv and put into static variables. Or you could use the sql retrieval process made available by Amibroker. Personally, I've done all four of these with success. Each has their place. But, before I go any further, perhaps you could confirm that this is what you are trying to accomplish - Original Message - From: Ken Close To: amibroker@yahoogroups.com Sent: Monday, June 02, 2008 9:19 AM Subject: RE: [amibroker] Adding data to field in existing symbol database. Well, thanks, but I need to add many symbols read automatically from a spreadsheet file into the database. The Quote Editor will not do it automatically as far as I know. Ken -- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jindrich Kostalek Sent: Monday, June 02, 2008 11:04 AM To: amibroker@yahoogroups.com Subject: RE: [amibroker] Adding data to field in existing symbol database. Have a look at Symbol Quote Editor . Henry From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ken Close Sent: Monday, June 02, 2008 4:37 PM To: amibroker@yahoogroups.com Subject: [amibroker] Adding data to field in existing symbol database. Amiquote and Import from ASQII are both aimed towards helping people import quotes from services like Yahoo. No where that I can find does the Help file (or the Knowledgebase, or the Users Knowledgebase, nor past archived messages) talk about how to ADD a value to an existing field (say an empty volume or OI field) in an existing database. Experimenting with the above mentioned tools does not produce the result I need. I have nowhere else to turn as all of the above resources are silent. As someone else said: can someone toss me a bone on this subject. Thanks for any help. Ken
Re: [amibroker] Adding data to field in existing symbol database.
Herman has very code sample code for using fopen. its for reading the TWS trade list. just look it up in amibroker files list. i haven't looked at it in a while, but its the best i've seen. The limitations of using SQL, as I have experienced are as follows: if you're using windows mysql, a database size of 0.5gig is probably about the limit before you start having serious problems with chart refreshing. Dummy tickers across 9,500 stocks is a LOT of work. That doubles ticker sizes at a minimum. I would shy away from this approach now that I've heard 9,500. Seems best might be either: (a) sql or (b) fopen static variable. One more thing I've done with a lot of success also is to use the getnote feature instead of using fopen filename process. This would work if you are assigning a single value to a ticker that applies for the whole array. based on the fact your data is already in sql, I'd recommend spending about 3-6 hours reading about odbc and v1.4.0 odbc/sql plug-in. google it: site:www.amibroker.com odbc using mysql, once up and running (thats the key) is fairly straightforward actually. it only took me a year to figure it out. now my database is too big and its creeping slow. but thats another problem unrelated to amibroker. Ken, if you were much more specific on how many data fields and how often the fields are different, I might be able to steer you in either the direction of fopen/filename or mysql approach. let me know and I can help a bit with this. sql is where i'm leaning given its much more structured and easier to code - once its up and running (caveat). - Original Message - From: Ken Close To: amibroker@yahoogroups.com Sent: Monday, June 02, 2008 11:49 AM Subject: RE: [amibroker] Adding data to field in existing symbol database. Chris: thanks for getting backreplies are below in CAPS: -- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Chris DePuy Sent: Monday, June 02, 2008 12:39 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Adding data to field in existing symbol database. Ken, I think you are asking whether you can add information to the Amibroker database that is not related to O,H,L,C,V, OI from a source that is different from Amiquote, right? YES, THIS IS WHAT I WANT TO DO. THE SOURCE WOULD BE AN EXTERNAL CSV FILE OR PERHAPS A TABLE(S) FROM A MYSQL DATABASE. If so, I'm afraid that ASCII import is probably your best bet. The way I've done that is to create a dummy ticker like a and then put information into the O array of a that relates to, say, bids and information into the H array of a for, say, asks. AT FIRST, I SHY AWAY FROM CREATING A DUMMY TICKER BECAUSE I NEED TO DO MY PROCESS ON A LOT OF SYMBOLS, ALMOST ALL OF THE SYMBOLS IN THE FASTTRACK DATABASE (9500+). BUT MAYBE THIS IS THE ONLY WAY. Then, in order to operate on this information, one relatively straightforward way is to use the Foreign command, like Foreign (a,O) when you need to retrieve bids. Or you could have amibroker retrieve these fields on demand (in your code) using fopen commands from a .csv format. or you could retrieve from .csv and put into static variables. Or you could use the sql retrieval process made available by Amibroker. NOW ALL OF THESE APPROACHES ARE SEPARATE FROM THE ASCII IMPORT THAT YOU SAID IS PROBABLY MY BEST BET. I NEED TO RETRIEVE THE KEY PARAMETER I WANT TO SAVE FOR EVERY SYMBOL FOR EVERY DATE THERE IS A QUANTITY AVAILABLE (MONTHLY DATA) BECAUSE THAT QUANTITY WILL BECOME A RANKING VARIABLE FOR BACKTESTING PURPOSES, PROBABLY USING IT, IN SOME MODIFIED FORM, AS THE POSITIONSCORE FOR A ROTATIONAL BACKTEST. CAN YOU SHARE (OR EMAIL ME DIRECTLY) SOME SAMPLE CODE FOR THE RETRIEVAL PART USING FOPEN. THE SQL RETRIEVAL PROCESS IS ALSO VERY INTERESTING BECAUSE THE RANKING VARIABLE I WANT TO USE IS NOW ENSCONCED IN MYSQL DATA TABLES, ONE TABLE FOR EACH DATE (MONTHLY) THAT THE RANKING PARAMETER WAS CREATED FOR. THIS WOULD HELP ME TREMENDOUSLY IN UNDERSTANDING THE STEPS AND FORMATS NEEDED FOR THE CODE FOR SUCH OPERATIONS. EXAMPLES I HAVE FOUND IN HELP FILES AND OTHER MESSAGES ARE JUST TOO SPARSE OR NOT RELEVANT FOR LEARNING ABOUT MY PROBLEM (RECENT EXAMPLE SUGGESTED IN MSG 121755 BEING A NOTABLE EXCEPTION). MANY THANKS. KEN Personally, I've done all four of these with success. Each has their place. But, before I go any further, perhaps you could confirm that this is what you are trying to accomplish - Original Message - From: Ken Close To: amibroker@yahoogroups.com Sent: Monday, June 02, 2008 9:19 AM Subject: RE: [amibroker] Adding data to field in existing symbol database. Well, thanks, but I need to add many symbols read automatically from a spreadsheet file into the database. The Quote
[amibroker] referring to a future date
If I wanted to compare a future date (has not occurred yet) that I have stored in a file and see if its 15 days from the last bar (today) and return true if that were the case or false if not, how would I do that??? odbcOpenDatabase(DSN=Fin); AB=CreateObject(Broker.Application); temp = odbcGetArraySQL(select case timeofday when 'B' then 1 when 'A' then 1 when 'D' then 1 when 'U' then 1 else 0 end,Date from epsreportdates where symbol='+Name()+'); temp = IIf(temp ==1 AND IsNull(Ref(temp,-1)),1,0); temp2 = odbcGetArraySQL(select date,Date from epsreportdates where symbol='+Name()+'); y = LastValue(Year()); m = LastValue(Month()); d = LastValue(Day()); Ld = y * 1 + m * 100 + d; printf(\n y = +y);printf(\n m = +m);printf(\n d = +d); printf(\n ld = +WriteVal(Ld,1.0)); ry = LastValue(ValueWhen(temp,Year())); rm = LastValue(ValueWhen(temp,Month())); rd = LastValue(ValueWhen(temp,Day())); rLd = ry * 1 + rm * 100 + rd; printf(\n\n ry = +ry);printf(\n rm = +rm);printf(\n rd = +rd); printf(\n rld = +WriteVal(rLd,1.0)); dif = Ld - rld; printf(\n\n dif = +dif); printf(\n temp2 = +WriteVal(temp2,1.0)); I was hoping that dif would be something like 15 if temp2 were 15 days in the future, but I'm not getting that. I think its because there are no bars out there. I'm sure there's an easier way than this path I'm headed down.
Re: [amibroker] amiquote lack of control
Yuki had asked in Re: [amibroker] amiquote lack of control now Louis has asked in Is it possible to run Amiquote automatically. Here is how to get Amiquote to run by itself from outside of Amibroker. Amibroker and its related programs are easy to make work from other programs, like DOS boxes, or by double clicking in windows. 1) http://www.google.com/search?hl=enq=site%3Awww.amibroker.com+OLE+amiquotebtnG=Google+Search 2) Now, here's some code to try (copy this into notepad). AQ = new ActiveXObject(AmiQuote.Document); AQ.Open(C:\\mysymbols.tls); FromDate = new Date(1995,5,1,0,0,0); /* year, month-1, day, hour, min, sec (required by JScript date constructor) */ ToDate = new Date; // current time /* getVarDate is required to convert from JScript Date to OLE-automation date */ AQ.From = FromDate.getVarDate(); AQ.To = ToDate.getVarDate(); AQ.AutoImport = true; // import automatically AQ.Source = 0; // Yahoo Historical AQ.Download(); // starts download // wait until download and import is finished while( AQ.DownloadInProgress || AQ.ImportInProgress ) { WScript.sleep(5000); // wait 5 seconds before querying status again } WScript.echo(Download and import complete); 3) Keep in mind, that you have to use notepad to create this. And call it, yuki.js and then save it. Then, double click yuki.js and it'll run a bunch of stuff in amiquote automatically. 4) If you are interested, you can use Scheduled Tasks to run yuki.js at scheduled times (See ramvilas 's email from 5/22/08) - Original Message - From: Yuki Taga To: Tomasz Janeczko Sent: Sunday, May 11, 2008 5:35 PM Subject: Re: [amibroker] amiquote lack of control Is there anything for normal people? I mean people who look at the link you have provided and say, Gee, that looks like it should be useful, somehow, but what now? People who think OLE is something you shout in Spain, at a bullfight? Yuki Saturday, May 10, 2008, 5:29:13 AM, you wrote: TJ Hello, TJ Automation via keyboard simulation is not reliable. TJ Reliable way to automate is to use OLE interface TJ and that is proper way to automate AmiQuote TJ http://www.amibroker.com/guide/aqobjects.html TJ Best regards, TJ Tomasz Janeczko TJ amibroker.com TJ - Original Message - TJ From: Yuki Taga [EMAIL PROTECTED] TJ To: amibroker@yahoogroups.com TJ Sent: Friday, May 09, 2008 1:37 PM TJ Subject: [amibroker] amiquote lack of control I use a keyboard automation program (Automate) to do a lot of routine tasks, including tasks that must get done when I'm on vacation. (When I'm on vacation, it means I don't even log into a computer for *any* reason -- in fact, I don't even want to *see* a computer when I'm on vacation.) I also keep a database of selected US indices and symbols (not large), that I update with Yahoo (dead-on accuracy is not necessary). But with Amiquote, I cannot toggle between 'Current' and 'Historical', because there is no way to do this via the keyboard. Unfortunately, some Yahoo symbols have daily data, but no historical data. I like to run 'Current' in the morning (my time), and 'Historical' in the afternoon. Then I'm covered. I have asked on more than one occasion that keyboard control be added to Amiquote, but it is apparently a very low priority. However, my next paid Amibroker upgrade will be an equally low priority unless there is a way to accomplish what I feel I need to do. Anyone? Yuki Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links
Re: [amibroker] amiquote lack of control
downloading the information as I wanted it to do. But then, my question is: how to take that information back to the Database I am using? If I understand correctly (I did some research on the site) the .tls is simply a ticker list with no more information, so where is going the information and how to make sure that that information will go straight back to the database? Thanks, Louis 2008/5/22 Louis Préfontaine [EMAIL PROTECTED]: Hi Chris, Thanks for your help. The problem I have is that... I am not sure how to use the .tls files! In fact, I never used them; instead I would simply use the Auto-updated quotes from the Tools menu in AB to automatically download the quotes from Amibroker. So, I see in the code that you posted that I need to have the .tls files setted, and I am not sure how to do this. 1) How to take the tickers in my current database and put them in the .tls; 2) How to be sure that the next morning when I will open AB it will open the good database and that the database will contain the new information from the .tls file. I guess this must be a really simple thing, but I still didn't get it... yet! Thanks, Louis 2008/5/22 Chris DePuy [EMAIL PROTECTED]: You could try this.. (where big = your database name). If you have questions about detailing this, then you might want to do a site:www.amibroker.com AB.LoadDatabase search and see what is on the ami site. Good luck /Amibroker open to database***/ AB = new ActiveXObject(Broker.Application); AB.LoadDatabase(C:\\Program Files\\Amibroker\\Big); AB.Visible = true; /* retrieve automatic analysis object */ AA = AB.Analysis; /Amiquote retrieve current***/ AQ = new ActiveXObject(AmiQuote.Document); AQ.Open(C:\\Program files\\Amibroker\\amiquote\\Big.tls); AQ.GetSymbolsFromAmiBroker(); FromDate = new Date(2006,7,1,0,0,0); /* year, month-1, day, hour, min, sec (required by JScript date constructor) */ ToDate = new Date; // current time /* getVarDate is required to convert from JScript Date to OLE-automation date */ AQ.From = FromDate.getVarDate(); AQ.To = ToDate.getVarDate(); AQ.AutoImport = true; // import automatically AQ.Source = 1; // Yahoo Current AQ.Download(); // starts download // wait until download and import is finished while( AQ.DownloadInProgress || AQ.ImportInProgress ) { WScript.sleep(5000); // wait 5 seconds before querying status again } /Amiquote retrieve current (end)***/ - Original Message - From: Louis Préfontaine To: amibroker@yahoogroups.com Sent: Thursday, May 22, 2008 8:33 AM Subject: Re: [amibroker] amiquote lack of control Thanks, This is what I was looking for... Unfortunately, I know nothing (nada, niet, rien) of this language. I don't use any .tls folder; is it possible to build such script that would automatically look into AB and update the quotes in the selected database? Or would it be better to save my current databse in .tls? Thanks, Louis 2008/5/22 Chris DePuy [EMAIL PROTECTED]: Yuki had asked in Re: [amibroker] amiquote lack of control now Louis has asked in Is it possible to run Amiquote automatically. Here is how to get Amiquote to run by itself from outside of Amibroker. Amibroker and its related programs are easy to make work from other programs, like DOS boxes, or by double clicking in windows. 1) http://www.google.com/search?hl=enq=site%3Awww.amibroker.com+OLE+amiquotebtnG=Google+Search 2) Now, here's some code to try (copy this into notepad). AQ = new ActiveXObject(AmiQuote.Document); AQ.Open(C:\\mysymbols.tls); FromDate = new Date(1995,5,1,0,0,0); /* year, month-1, day, hour, min, sec (required by JScript date constructor) */ ToDate = new Date; // current time /* getVarDate is required to convert from JScript Date to OLE-automation date */ AQ.From
Re: [amibroker] plugin status
Paul, i think you can use VTask Studio (i think it costs $100 or so) and use a command that says something like Wait for Pixel (wait till its green) before it proceeds. You'd have to move the window to an identical position each time so that the Wait for Pixel thing finds the green light the same place each time. This sounds like a kluge, but it will probably work. Perhaps there is a way to get at that status using an OLE type of command, but I'm not aware of it. - Original Message - From: Paul Ho To: amibroker@yahoogroups.com Sent: Wednesday, April 30, 2008 5:15 AM Subject: [amibroker] plugin status I have been using a script to do backfilling every evening. However, one of the problem I face is that the script starting a scan before the plugin status has turned green, causing the scan to lock up. I have tried putting a wait statement in the script, it sort of works, but not when the plugin is having a real delay in connecting. Is there a function/way I could use to poll the plugin status? Best Regards Paul.
Re: [amibroker] Re: calculating the mean of only some of the observations in an array ?
Thanks Paul, this worked very well for me (and was similar to what Ed Hoopes suggested an hour later), though using this method requires that I do my own calculation of things like standard deviation and anything else that is more complex than summing up things that occur occassionally. Ara and Ed, thank you! Here is what i did (probably the long way, but I don't care about speed): cond6={my condition} NumBars=12; hV = IIf(BarsSince(Cond6) == NumBars,HHV(H,BarsSince(Cond6))-ValueWhen(Cond6,C),Null); Sumhv = Cum(IIf(BarsSince(Cond6) == NumBars,hV,0)); Counthv = Cum(IIf(BarsSince(Cond6) == NumBars,1,0)); Avghv = Sumhv/Counthv; AddColumn(Avghv,avghv,1.3); //AddColumn(Sumhv,sumhv,1.3); //AddColumn(counthv,counthv,1.3); Sumsquareshv= Cum(IIf(BarsSince(Cond6) == NumBars,(hV - Avghv) ^ 2, 0)); Avgsumsquareshv = Sumsquareshv / Counthv; stddeviationhv = sqrt(Avgsumsquareshv); AddColumn(stddeviationhv,stddev hv,1.3); - Original Message - From: Paul Ho To: amibroker@yahoogroups.com Sent: Monday, April 28, 2008 5:17 PM Subject: RE: [amibroker] Re: calculating the mean of only some of the observations in an array ? You can try the Cum function together with teh IIF function to sum the array that meet the conditions mysum = cum(iif(signal whatever, signal, 0)) mycount = cum(iif(signal whatever, 1, 0)) myavg = lastvalue(mysum/mycount) From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of cdepuy Sent: Tuesday, 29 April 2008 8:22 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: calculating the mean of only some of the observations in an array ? Ara, thanks for responding. Actually what I'm trying to do is a little different. Here is what the array might look like signal [EMAIL PROTECTED] avgofmyobsv 0 -- 1 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 .05 .050 0 -- 0 -- 1 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 .06 .055 0 -- 0 -- 1 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 -- 0 .07 .060 --- In amibroker@yahoogroups.com, Ara Kaloustian [EMAIL PROTECTED] wrote: if you are using loops and you know when your signal was generated, use that bar number as the starting poing point for your loop. Pick an end point as you edesire. a = SignalBarNumber; b = Bars required in your calculation; for (i=a; i a+b; i++) ... - Original Message - From: cdepuy [EMAIL PROTECTED] To: amibroker@yahoogroups.com Sent: Monday, April 28, 2008 2:40 PM Subject: [amibroker] calculating the mean of only some of the observations in an array ? Without requiring loops that work through the whole barcount, can someone point out to me how to exclude certain values in an array when calculating a statistic across an array? I must be missing something. I am trying to calculate the mean of some values that occur only occassionally (after my signal) using Amibroker. But,what happens is all the values between my signals get included in the calculation. I know the solution is easy, but I cannot figure it out. //figure highest value that occurs between my signals and the next x following the signal Cond6 = {some condition that i am investigating, like v 5*ma (v,50) NumBars = 12; hV = IIf(BarsSince(Cond6) == NumBars,HHV(H,BarsSince(Cond6))- ValueWhen (Cond6,C),Null); //now calculate the mean of all the hv 's that occur mean = ma(hv,NumBars*50); //this line I am having trouble with filter=1; addcolumn(mean,mean,1.2); //then perform more statistics...(etc). Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links
[amibroker] code to plot vertical line?
hi i m trying to go around the fact that i can t find how set fib time tool 1 point parameter, so i m looking for a code to draw a vertical line ( with parameters) and if possible that th starting point is selected with a mouse click thanks for your help
[amibroker] Re: fibonacci time tool
thanks for the link, but it doesn t help in the case of fib time tool paul, if i find anything i ll let you know --- In amibroker@yahoogroups.com, wavemechanic [EMAIL PROTECTED] wrote: http://www.amibroker.com/guide/drawtools.html Bill - Original Message - From: paulradge To: amibroker@yahoogroups.com Sent: Thursday, December 06, 2007 5:29 AM Subject: Re: [amibroker] fibonacci time tool Hi Chris,,, excellent question sir ,,, i too would like to extend the Fib time zone indicator and modify the parameter's to other periods,,,and most of all i'd like to be able to use it backwards ie to the left from a fixed point and also the standard to the right from a fixed point. watching with interest hope you/we get lucky on the how to, warm regards Paul i can t find the settings for fibonacci time tool(1point) i would like to add higher values then it shows by default. If not possible is there a way to code it? thanks --- --- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.13/1167 - Release Date: 12/3/2007 12:20 PM
[amibroker] duplicating chart sheets in Amibroker can someone help
I have 35 chart sheets each tab has a different name. I have charts and indicators in these chart sheets.I have 4 of theses chart sheets which have a number of different indicators but the same type of chart. I can put say a trend line on the chart in one of the chart sheets and it will show on all four. All my other chart sheets wont show the trend line. I set this up a long time ago and I have forgotten how to do it. I accidentally deleted one of my charts today and cant get it to work for me. Can someone tell me how to go about getting more of my chart sheets to duplicate whatever I put on one chart on one page to go onto the next page Much appreciated if someone can help me Chris
[amibroker] seban Supertrend : plz help convert frm tradestation to amibroker
hi , i found this script on tradestation that looks really good for stops and entries. it is from tradestation.can someone help to convert it?thanks {HBKeltnerbandesPGI: Bandes Plus Haut Plus Bas et moyenne sur intervalle donne (type supertrend de Seban) Type calcul= 1 moy arith sans seuil 2 moy arith avec seuil 3 moy expo sans seuil 4 moy expo avec seuil 5 moy pond sans seuil 6 moy pond avec seuil BY041206 X} INPUTs: CorrGapJNouO(1); vars:Gap(0),GapJCumu(0),CC(C),HC(H),BC(L),OC(O); {Correction des gaps } if CorrGapJNouO=1 then begin if DateDate[1] then begin Gap=Gap[1]+C-C[1]; end; GapJCumu=Gap; end else GapJCumu=0; CC=C-GapJCumu;HC=H-GapJCumu;BC=L-GapJCumu;OC=L-GapJCumu; Var: HBKTypPrxCentr(1),HBKTypPrxSort(2),HBKintrvp(1),klargeurSup (2),klargeurInf(-2); Input: Klargeur(3), HBKLisp(20), ColorSup(DarkGreen), ColorInf(Red); KlargeurSup = Klargeur; KlargeurInf =-Klargeur; var: HBKPrxCentr(C),HBKPrxSort(C),HBKPlusH(0),HBKPlusB(0),HB (0),AmplitudVrGIntHBK(0), HBKAtr(0), HBKMoy(0),HBKH(0),HBKB(0),HBKHMoy(0),HBKBMoy (0),HBKtendance(0), HBKLisIntrvp(HBKLisp*HBKintrvp),Maxccant(HBKLisIntrvp); HBKPlusH=HighestFC(HC,HBKintrvp); HBKPlusB=LowestFC(BC,HBKintrvp); if HBKTypPrxCentr =1 then HBKPrxCentr=cc; if HBKTypPrxCentr =2 then HBKPrxCentr=(HBKPlusH+HBKPlusB) *0.5; if HBKTypPrxCentr =3 then HBKPrxCentr= (HBKPlusH+HBKPlusB+cc)/3; if HBKTypPrxCentr =4 then HBKPrxCentr= (HBKPlusH+HBKPlusB+cc+OC[HBKintrvp-1])*0.25; if HBKTypPrxCentr =5 then HBKPrxCentr=(HBKPlusH+HBKPlusB+cc [HBKintrvp])/3; if HBKTypPrxCentr =6 then HBKPrxCentr=(HBKPlusH+HBKPlusB+cc [HBKintrvp]+OC[HBKintrvp-1])*0.25; if HBKTypPrxSort =1 then HBKPrxSort=cc; if HBKTypPrxSort =2 then HBKPrxSort=(HBKPlusH+HBKPlusB)*0.5; if HBKTypPrxSort =3 then HBKPrxSort=(HBKPlusH+HBKPlusB+cc)/3; if HBKTypPrxSort =4 then HBKPrxSort=(HBKPlusH+HBKPlusB+cc+OC [HBKintrvp-1])*0.25; if HBKTypPrxSort =5 then HBKPrxSort=(HBKPlusH+HBKPlusB+cc [HBKintrvp])/3; if HBKTypPrxSort =6 then HBKPrxSort=(HBKPlusH+HBKPlusB+cc [HBKintrvp]+OC[HBKintrvp-1])*0.25; AmplitudVrGIntHBK=(maxlist(HBKPlusH,CC[HBKintrvp])- minlist(HBKPlusB,CC[HBKintrvp]))*0.5; Var:typeCalcul(6),GrafInfOuSup(1); if HBKLisp1 then begin if typeCalcul=1 then begin HBKMoy=average (HBKPrxCentr,HBKLisIntrvp); HBKAtr=average (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr; HBKBMoy=HBkmoy+klargeurInf*HBKAtr; end; if typeCalcul=2 then begin HBKMoy=average (HBKPrxCentr,HBKLisIntrvp); HBKAtr=average (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr;if HBKTendance=-1 then HBKHmoy=minlist(HBKHmoy,HBKHmoy[1]); HBKBMoy=HBkmoy+klargeurInf*HBKAtr;;if HBKTendance=1 then HBKBmoy=maxlist(HBKBmoy,HBKBmoy[1]); end; if typeCalcul=3 then begin HBKMoy=xaverage (HBKPrxCentr,HBKLisIntrvp); HBKAtr=xaverage (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr; HBKBMoy=HBkmoy+klargeurInf*HBKAtr; end; if typeCalcul=4 then begin HBKMoy=Xaverage (HBKPrxCentr,HBKLisIntrvp); HBKAtr=Xaverage (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr;if HBKTendance=-1 then HBKHmoy=minlist(HBKHmoy,HBKHmoy[1]); HBKBMoy=HBkmoy+klargeurInf*HBKAtr;;if HBKTendance=1 then HBKBmoy=maxlist(HBKBmoy,HBKBmoy[1]); end; if typeCalcul=5 then begin HBKMoy=Waverage (HBKPrxCentr,HBKLisIntrvp); HBKAtr=Waverage (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr; HBKBMoy=HBkmoy+klargeurInf*HBKAtr; end; if typeCalcul=6 then begin HBKMoy=average (HBKPrxCentr,HBKLisIntrvp); HBKAtr=Waverage (AmplitudVrGIntHBK,HBKLisIntrvp); HBKHMoy=HBkmoy+klargeurSup*HBKAtr;if HBKTendance=-1 then HBKHmoy=minlist(HBKHmoy,HBKHmoy[1]);
[amibroker] RSI Calculation wrong?
Good evening, I'm using Amibroker to write a system and also the C++ language. The problem is my RSI value doesn't match up to AmiBrokers. Here is my data for a RSI of 8 periods using GBP/USD; the values; 1.9796 1.9810 1.9796 1.9736 1.9663 1.9629 1.9531 1.9545 1.9566 differences; +14 -14 -60 -73 -34 -98 +14 +21 plus_average = .0049 / 8 = 0.0006125 minus_average = .0279 / 8 = .0034875 (plus_average / minus_average) + 1 = 1.1756272401 100 / 1.1756272401 = 85.0609 100 - 85.0609 = 14.9391 - my result Amibroker shows 17.9051 - AmiBrokers This is the RSIa indicator using the first RSI value and no smoothed RS since it's the first value for both my system and AmiBrokers. Driving me nuts. Chris Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
[amibroker] Re: Amibroker Performance Guidelines --- note for Christ --- get lots of RAM
Thanks B --- In amibroker@yahoogroups.com, b519b [EMAIL PROTECTED] wrote: Chris: If you are doing optimizations, the most important thing is to have enough RAM. If your database will not fit into RAM then the speed of your hard disk will limit your new CPU so that it runs only at 50% or 30% of its potential. How much RAM? 1 GB will not be enough. Lets assume that Windows will take about 500MB. Let's also assume your AB database is 500MB. Now lets add another 200-300MB in case you want to run a couple other programs. 1 GB will be very cramped. But 2 GB should be enough. Given the price of RAM, I personally would go for 4 GB and never have to worry. b --- In amibroker@yahoogroups.com, Chris yahooshawky@ wrote: Hi I know this is a little off topic and sort of covered in the past, I have the following observation and questions relating to an approach for my overdue PC upgrade on a budget. 1. I thought that my trading software including Amibroker was both disk and memory bound. I created a small ramdisk and put a sample ASX database in there. On my P3 PC there was not a significant performance improvement as most of the time appeared to be in AFL calculation and screen update. i.e. confirms that AB has a nicely optimised database. Scans seem to run at full CPU usage. 2. My other share program is not as efficient, and appears to be disk bound so I know I need to focus on increasing disk performance. AB would benefit from this for EOD updates. The big question relates to determining what type of CPU (AMD, Intel, single, multi core, Duo, Extreme etc). Many tests show different performance results quite often unrelated to the clock speed. For example, reviews seem to be saying that the new intel core 2 duo eats AMD's top of the line cpus. But when I look at the comparitive results and focus on floating point or integer calculations or say generation of pdf file the results say different. Yes, one brand/model CPU might be great for those playing games or doing video editing, but how does that relate to you and I who have a PC to earn a living trading? One method is to just buy a top of the line model. But, for something that in our application may only be 10-20% slower at way under half the price is better value, upgrade each year and still save money... Any thoughts are most welcome. A reference to a particular benchmark test from say: http://www23.tomshardware.com/cpu.html? modelx=33model1=433model2=694chart=191 I selected the virus scan as an example as it is simple data crunching and file IO. Notice that an AMD6000 performs well to the cpus 3-4 times the price. All the best with your trading regards Shawky
[amibroker] Amibroker Performance Guidelines
Hi I know this is a little off topic and sort of covered in the past, I have the following observation and questions relating to an approach for my overdue PC upgrade on a budget. 1. I thought that my trading software including Amibroker was both disk and memory bound. I created a small ramdisk and put a sample ASX database in there. On my P3 PC there was not a significant performance improvement as most of the time appeared to be in AFL calculation and screen update. i.e. confirms that AB has a nicely optimised database. Scans seem to run at full CPU usage. 2. My other share program is not as efficient, and appears to be disk bound so I know I need to focus on increasing disk performance. AB would benefit from this for EOD updates. The big question relates to determining what type of CPU (AMD, Intel, single, multi core, Duo, Extreme etc). Many tests show different performance results quite often unrelated to the clock speed. For example, reviews seem to be saying that the new intel core 2 duo eats AMD's top of the line cpus. But when I look at the comparitive results and focus on floating point or integer calculations or say generation of pdf file the results say different. Yes, one brand/model CPU might be great for those playing games or doing video editing, but how does that relate to you and I who have a PC to earn a living trading? One method is to just buy a top of the line model. But, for something that in our application may only be 10-20% slower at way under half the price is better value, upgrade each year and still save money... Any thoughts are most welcome. A reference to a particular benchmark test from say: http://www23.tomshardware.com/cpu.html? modelx=33model1=433model2=694chart=191 I selected the virus scan as an example as it is simple data crunching and file IO. Notice that an AMD6000 performs well to the cpus 3-4 times the price. All the best with your trading regards Shawky
Re: [amibroker] Backtest - using Multiple Time Frames
I'm no expert at this, but my experience is: Using this expandfirst will cause many false signals in actual trading. This is because your signals will effectively be overwritten. I've backtested some expandfirst systems with awsome results only to find that when trading these, you don't actually create buy and sell signals the same way in backtest as you would if you move forward in time (eg tick replay or real-life). - Original Message - From: Ara Kaloustian To: AB-Main Sent: Sunday, March 04, 2007 11:01 AM Subject: [amibroker] Backtest - using Multiple Time Frames I was reviewing some of my work ... an item jumped at me and I'd like to open it up for comments / discussion. I had some tests using ExpandFirst to decompress weekly data on daily chart, that produced significantly better results that when I used ExpandLast. There was some posting a while back why it is inapropriate to use ExpandFirst. Specifically that the value of array on Friday is assummed to be known from beginning of week. A little bit of philosophy here ... Granted that ExpandFirst does assume we know values for Friday from Monday's data ... BUT is that necessarily a bad thing. Why can we not look at it as advanced forsight? My thinking is that if we get an improvement in prices early in the week, statistically they will be somewhat reflected at the end of the week also, so that using those prices with ExpandFirst is more right than wrong. Using Multiple time frames (weekly AND daily) should insure that the statistical edge mentioned above will likely be true because it is unlikely that a trade signal will be generated erroneously from both daily and weekly timeframes. Appreciate your thoughts. Ara
Re: [amibroker] Yahoo historical
Anthony, Easiest explanation is you didn't update Current price for 2/20/07 yet. I've had this happen. Chris - Original Message - From: Anthony Faragasso To: amibroker@yahoogroups.com Sent: Tuesday, February 20, 2007 4:46 PM Subject: [amibroker] Yahoo historical Does any one know if Yahoo stopped providing dataI have not been able to download historical data since 2-16-07...with amiquoteit says that is is downloaded and imported, but when you go into the file there is nothing since 2-16-06 Thanks Anthony
Re: [amibroker] Brain Blanked
AASettings=Status(action); if (AASettings == 1) { your stuff} etc. - Original Message - From: Keith McCombs To: amibroker@yahoogroups.com Sent: Tuesday, February 06, 2007 6:24 PM Subject: [amibroker] Brain Blanked I know that somehow I can code something that would do the following: IF Backtesting do this code IF Exploration do that code There is some function that allows code to be depended on what method is being run?? Thanks. Almost to embarrassed to sign -- Keith (I said 'almost')
Re: [amibroker] eSignal Over 100 Ticker warnings
Herman, The answer is yes. Here is what I can tell you: (a) backfilling adds more perceived tickers to the ticker count (b) it happens when you ask AB to explore, scan, indicate over 100 ticker, even if you're not simultaneously viewing them (c) I've been advised by support at ami that shutting off data manager and restarting it will start the ticker count at zero temporily (and it works) I have found no work-arounds to these annoying messages. I don't know about the consequences of routinely going ones quota. Chris - Original Message - From: Herman To: AmiBroker Sent: Friday, January 19, 2007 5:33 AM Subject: [amibroker] eSignal Over 100 Ticker warnings I keep getting warnings from eSignal that i am trying to refresh more than 100 tickers. I have my DB set for 99 tickers. This happens oftent when I stick quickly through the ticker tree and symbols can't backfill fast enough (minute data). 1) Any ideas how to prevent this? 2) Has anyone been cut off by eSignal from collecting data due to these errors? 3) How to use explore to backfill more than 100 tickers without this problem? 4) Should i worry about it? thanks for any help you can give. herman
[amibroker] AlertIf question
Can I get AlertIf to send me an email when its placed into indicator code using frequently refreshed yahoo data (eg delayed intraday retrieved every 2 minutes?) I know how to get AlertIf working using AA/Scan, for instance. Once a scan is found true, then the AlertIf command sends the email. Instead of using AA/Scan, I have an indicator running a loop through approx 20 tickers on the refresh cycle. I want to get an email when a price changes that causes a condition to be met. Below is a snippet of what I tried, but it doesn't seem to be triggering: openpos =AAPL,CSCO,COMS; for ( i = 0; ( symbol = StrExtract( openpos, i ) ) != ; i++ ) { Buy=my conditions, etc. inLong=Flip(Buy OR Cover,Sell OR Short); AlertIf( LastValue(inLong,True) == 1, EMAIL, Short Violation on +symbol,5,4); }
Re: [amibroker] Re: using say(text) (AmiBroker 4.89.0 BETA released )
I haven't done this yet, but Flip function should work. - Original Message - From: J. Biran To: amibroker@yahoogroups.com Sent: Friday, December 22, 2006 7:02 PM Subject: RE: [amibroker] Re: using say(text) (AmiBroker 4.89.0 BETA released ) How does one use the say(text) function such that it is only stated once and does not repeat even if the condition that it depends on continues to be true? Joseph Biran --- In amibroker@yahoogroups.com, Tomasz Janeczko [EMAIL PROTECTED] wrote: Hello, AmiBroker 4.89.0 BETA has just been released http://www.amibroker.com/devlog/2006/12/21/amibroker-4890-beta- released/ Happy Holiday Season! Best regards, Tomasz Janeczko amibroker.com
Re: [amibroker] Re: Access to fundamental data using QuotesPlus
Tom, I do not use QuotesPlus, but i assume that if you configure the database right you could use Amiquote to retrieve Yahoo fundamentals. Those are what I was referring to below when I gave you the AFL code snipped relating to OneYearTargetPrice. If worst came to worst, you could retrieve OneYearTargetPrice using Yahoo/amiquote in a separate database, save these to Amibroker Notes, then open your QuotesPlus database and then request the targetprice using NoteGet. Good luck. If you want some more help about retrieving Yahoo fundamentals, I've spent a great deal of time on this subject recently and I'm happy to lend a hand. Chris - Original Message - From: trb0428 To: amibroker@yahoogroups.com Sent: Friday, December 08, 2006 10:56 AM Subject: [amibroker] Re: Access to fundamental data using QuotesPlus Chris, Thanks for the suggestionsI will try them. However with QuotesPlus as my data source, I do not have access to OneYearTargetPrice and do not use the GetFnData call. I am limited to the fields supported by the GetExtraData() function. Perhaps Tomasz will consider expanding the QP plugin to support the additional fields in the QP download? Thanks, Tom --- In amibroker@yahoogroups.com, Chris DePuy [EMAIL PROTECTED] wrote: Tom, 1) Perhaps OneYearTargetPrice will suffice? I've heard some folks using quant/tech strategies use this as a potential resistance level. http://www.amibroker.com/devlog/wp- content/uploads/2006/06/ReadMe4810.html. You could try: OneYearTargetPrice = GetFnData(OneYearTargetPrice); Upside=OneYearTargetPrice/C-1; Addcolumn(Upside,Upside,1.2); 2) You may also notice that when an upgrade happens, very frequently (like 90-95% of the time) estimates go higher (and downgrade/lower). For this you could use any/many of the EPS estimates available from GetFnData. You just have to track it (this is the tough part) to see what it was a day ago, week ago, etc. Some of the most sustainable moves in growth stocks are found using revisions data. 3) Another point to consider is that these analyst opinions will sometimes help you buy the stock, but almost never help you get out, so even if you had this information, it would not help you exit the stock. I've done some studies on this (and # of covering analysts, next 12 months EPS estimates, etc) and related topics using thomsononeanalytics.com excel add-in data. Additionally, there have been several unsuccessful fund strategies at brokerage firms that used the buys/sells from the firm's analyst teams. Also, if analyst opinions are important to you, you may want to consider subscribing to Starmine, which ferrets out who are the best analysts and focuses on their moves. Chris - Original Message - From: Joe Landry To: amibroker@yahoogroups.com Sent: Thursday, December 07, 2006 5:31 PM Subject: Re: [amibroker] Access to fundamental data using QuotesPlus The GetExtraData functions are supported by the QP plug in, and the only way I see to do it is to extend the QP plug in, not likely to happen unless done by someone in the AB user community. HTH Joe - Original Message - From: trb0428 To: amibroker@yahoogroups.com Sent: Thursday, December 07, 2006 4:17 PM Subject: [amibroker] Access to fundamental data using QuotesPlus Hi - Does anyone know if there is a way to access the Analysts Recommendations field from within AB when using Quotes Plus as my data source? I can access other fields using the GetExtraData () AFL function but Analysts Recommendation does not appear on the list. Any Ideas? Thanks, Tom
Re: [amibroker] Access to fundamental data using QuotesPlus
Tom, 1) Perhaps OneYearTargetPrice will suffice? I've heard some folks using quant/tech strategies use this as a potential resistance level. http://www.amibroker.com/devlog/wp-content/uploads/2006/06/ReadMe4810.html. You could try: OneYearTargetPrice = GetFnData(OneYearTargetPrice); Upside=OneYearTargetPrice/C-1; Addcolumn(Upside,Upside,1.2); 2) You may also notice that when an upgrade happens, very frequently (like 90-95% of the time) estimates go higher (and downgrade/lower). For this you could use any/many of the EPS estimates available from GetFnData. You just have to track it (this is the tough part) to see what it was a day ago, week ago, etc. Some of the most sustainable moves in growth stocks are found using revisions data. 3) Another point to consider is that these analyst opinions will sometimes help you buy the stock, but almost never help you get out, so even if you had this information, it would not help you exit the stock. I've done some studies on this (and # of covering analysts, next 12 months EPS estimates, etc) and related topics using thomsononeanalytics.com excel add-in data. Additionally, there have been several unsuccessful fund strategies at brokerage firms that used the buys/sells from the firm's analyst teams. Also, if analyst opinions are important to you, you may want to consider subscribing to Starmine, which ferrets out who are the best analysts and focuses on their moves. Chris - Original Message - From: Joe Landry To: amibroker@yahoogroups.com Sent: Thursday, December 07, 2006 5:31 PM Subject: Re: [amibroker] Access to fundamental data using QuotesPlus The GetExtraData functions are supported by the QP plug in, and the only way I see to do it is to extend the QP plug in, not likely to happen unless done by someone in the AB user community. HTH Joe - Original Message - From: trb0428 To: amibroker@yahoogroups.com Sent: Thursday, December 07, 2006 4:17 PM Subject: [amibroker] Access to fundamental data using QuotesPlus Hi - Does anyone know if there is a way to access the Analysts Recommendations field from within AB when using Quotes Plus as my data source? I can access other fields using the GetExtraData() AFL function but Analysts Recommendation does not appear on the list. Any Ideas? Thanks, Tom
Re: [amibroker] Trading Basis
thomas, i just bot your sw and requested an unlock key. i got what i believe is an auto responder about how it takes a week. the problem is that there's a nagware dialogue box now that totally screws up my automation routines on other systems that i set up. unless i get rid of this key i have to figure out how to totally un-instal the software and then re-install it when i get the key. can you please send me the key sooner so i don't have to re-do all this. many thanks. chris i am [EMAIL PROTECTED] . i just use the [EMAIL PROTECTED] for the yahoo groups. - Original Message - From: Thomas Z. To: amibroker@yahoogroups.com Sent: Friday, December 01, 2006 1:12 PM Subject: RE: [amibroker] Trading Basis Hello Bruce, you can find more informations on my new website: www.amibroker-tools.com Feel free to contact me for detailed questions. Best Regards Thomas www.amibroker-tools.com -- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bruce Hawkins Sent: Friday, December 01, 2006 9:58 PM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Trading Basis Thanks for all of the replies. Are the actual AFL's able to be looked at and modified? Don Lindberg wrote: Bruce, I have been using Trading Basis for last 5 months, and love it. I especially like his composite indicators for looking at Sectors and Industries. I have 8 screens with various views, and every one of these screens uses some part of the Trading Basis code. In addition to a fine program, the support is Par Excellent. I always get very quick answers to my questions and many times coding tips to do something I am trying to do. Thomas (the owner) even created the Guppy Moving Average chart at my request! I would highly recommend this program as a great addition to AmiBroker. Don Lindberg ---Original Message--- From: Bruce Hawkins Date: 12/1/2006 4:14:32 AM To: amibroker@yahoogroups.com Subject: Re: [amibroker] Trading Basis Is anybody using any of the Trading Basis tools? If so, do you think they are worth the money. thanks, Internal Virus Database is out-of-date.Checked by AVG Free Edition.Version: 7.1.408 / Virus Database: 268.13.9/490 - Release Date: 10/20/2006
Re: [amibroker] Title= question
This lack of "tab" function makes the output screen messy for lots of rows/columns and limits how much can be put there legibly. The only way I can follow multiple lines of entry is to use encodecolor(colorblue) for column one and then encodecolor(colorwhite) for column two and so on (so visually I can see down as the entries snake their way through). Thanks for the _N suggestion. That does neaten up the commentary output window a lot, though. I snooped around a bit on this group's archive looking for a solution. The \\cc functions don't cause a tab (these change color and Tomasz doesn't suggest using because encodecolor(colorred) is better. I spent half an hour looking at escape characters (in wikipedia) and ASCII character codes but i couldn't find a combination that works to permit a TAB. Given that the \n works to cause a newline, i suspect a new release of amibroker could easily add \t to cause a tab. I'll submit that suggestion. Thanks very much for your help, Terry. - Original Message - From: Terry To: amibroker@yahoogroups.com Sent: Tuesday, October 10, 2006 1:29 PM Subject: RE: [amibroker] Title= question Chris, I ran this little test. The \t works in the interpretation window, but it does not work in the chart Title. This code prints both places since I did not surround the Title = statement with _N(Title = "stuff"); However, the \n does work to create a newline. Plot(C,Name(),1); Plot(m = MA(C,20),"MA",2); Title = "Close:\t\t" + C + "\nMA\t\t" + m + "\n{{VALUES}}\t{{DATE}}"; -- Terry -Original Message-From: [EMAIL PROTECTED]ps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Chris DePuySent: Monday, October 09, 2006 23:00To: [EMAIL PROTECTED]ps.comSubject: Re: [amibroker] Title= question Is it possible to place a TAB format into a Title=? Using interpretation, "\T" is a tab, but in the Title (title = "\T") just gives you a box and doesn't push the next text over neatly. Terry, thanks for your help on the title=title+"new stuff" below. - Original Message - From: Terry To: [EMAIL PROTECTED]ps.com Sent: Monday, October 09, 2006 4:00 PM Subject: RE: [amibroker] Title= question Title is just a variable so, Title = Title + "new stuff"; -- Terry -Original Message-From: [EMAIL PROTECTED]ps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Chris DePuySent: Monday, October 09, 2006 16:24To: [EMAIL PROTECTED]ps.comSubject: [amibroker] Title= question It seems like Herman used two separate Title= commands here, one for the text up on top and another inside the T=0 loop that follows. How do you make so the second Title= command doesn't just supersede the one before it? I am blasting this question to the normal amibroker list even though it was initially sent this to the AT list because my question relates to non AT issues. PS: Herman, thanks for the ticker list idea, by the way. - Original Message - From: Herman To: AmiBroker-at@yahoogroups.com Sent: Tuesday, August 29, 2006 2:25 AM Subject: Re: [AmiBroker-at] FW: Re: ONE SECOND REFRESH IS HERE! (was [OT] AT State-Engines) You use a loop to test all the tickers in a watchlist, see example below. I use such loops to calculate RT prices, to place orders, to create display table, etc. I use includes when code is "finished" but somehow my code is never finished :-) Except for debugging I don't usually display chart signals, a table with system status and trades in progress is all I need - see below.TickersTraded = StaticVarGetText("TickersTraded");for( T=0; (Ticker = StrExtract( TickersTraded, T ) ) != ""; T++ ) { TickerLastPrice = GetRTDataForeign("Last",Ticker); ... etc ... }A typical (off-line now) trading screen:best regards,hermanjppt0k wrote: Hello Herman,a couple of questions because I'm not sure I have understood.You have your chart with the system loaded (the system written within or do you use #include?) and then every trading signal that's generated by the system is plotted onto it (plotshapes or else?).But you don't limit this way the trading signals to the current ticker? Or there's a way to run a scan every tick
[amibroker] Title= question
It seems like Herman used two separate Title= commands here, one for the text up on top and another inside the T=0 loop that follows. How do you make so the second Title= command doesn't just supersede the one before it? I am blasting this question to the normal amibroker list even though it was initially sent this to the AT list because my question relates to non AT issues. PS: Herman, thanks for the ticker list idea, by the way. - Original Message - From: Herman To: [EMAIL PROTECTED] Sent: Tuesday, August 29, 2006 2:25 AM Subject: Re: [AmiBroker-at] FW: Re: ONE SECOND REFRESH IS HERE! (was [OT] AT State-Engines) You use a loop to test all the tickers in a watchlist, see example below. I use such loops to calculate RT prices, to place orders, to create display table, etc. I use includes when code is "finished" but somehow my code is never finished :-) Except for debugging I don't usually display chart signals, a table with system status and trades in progress is all I need - see below.TickersTraded = StaticVarGetText("TickersTraded");for( T=0; (Ticker = StrExtract( TickersTraded, T ) ) != ""; T++ ) { TickerLastPrice = GetRTDataForeign("Last",Ticker); ... etc ... }A typical (off-line now) trading screen:best regards,hermanjppt0k wrote: Hello Herman,a couple of questions because I'm not sure I have understood.You have your chart with the system loaded (the system written within or do you use #include?) and then every trading signal that's generated by the system is plotted onto it (plotshapes or else?).But you don't limit this way the trading signals to the current ticker? Or there's a way to run a scan every tick this way?Thanks in advance for you inputs.jHerman wrote: Hello Angelo, Code in an Indicator window executes with each new quote or each second if you use the new function. For me , in real-time trading I want my system to trade as soon as possible after it detects a price change that triggers a trade, not 5 seconds later. As far as i know the AA doesn't do that, also RT systems are hard to debug in the AA as you can't display debugging charts. I use the AA for explorations, backtesting, etc. but not for RT trading. best regards, hermanAngelo wrote: --- In AmiBroker-at@yahoogroups.com mailto:AmiBroker-at%40yahoogroups.com, "Herman" [EMAIL PROTECTED] wrote: I run my trading systems in the Indicator window, this normally refreshes each time a quote comes in Hi Herman, it seems that this is just what I'm looking for (I maen, what I've been asking at http://finance.groups.yahoo.com/group/amibroker/message/100305 http://finance.groups.yahoo.com/group/amibroker/message/100305) . Could you please elaborate a bit more on what exactly means "run a system from the indicator window"? Many thanks, Angelo. __._,_.___ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html SPONSORED LINKS Software support Small business finance Business finance online Business finance training Business finance course YAHOO! GROUPS LINKS Visit your group "amibroker" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___
Re: [amibroker] How to use Bloomberg datasource in Amibroker
I used DDE with Bloomberg orInstiquote (can't really remember which one but it was pretty straightforward) about 6 months ago for a few days and I'm pretty sure the reason I stopped was because it didn't have historical data. But, remapping the tickers is fairly straightforward and the codes are pretty similar to those you'd see if you do a lot of spreadsheet calls from the blp API. Depending on what reason you're using Amibroker, even though you're shelling out $1,750 plus exchange fees per month, it might just be better to use 15-min delayed Yahoo data (even have it update every 5 minutes "automatically" using Amiquote), or use one of the supported systems like eSignal (which costs you more money but probably saves you a lot of time). - Original Message - From: fc6191 To: amibroker@yahoogroups.com Sent: Monday, October 09, 2006 3:41 PM Subject: [amibroker] How to use Bloomberg datasource in Amibroker Does anyone know whether it is possible to use Bloomberg as dataprovider? It seems there is no plug-in for it but perhaps one can do it with DDE?Anyone having experience how well this works? __._,_.___ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html SPONSORED LINKS Software support Small business finance Business finance online Business finance training Business finance course Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___
Re: [amibroker] Title= question
Is it possible to place a TAB format into a Title=? Using interpretation, "\T" is a tab, but in the Title (title = "\T") just gives you a box and doesn't push the next text over neatly. Terry, thanks for your help on the title=title+"new stuff" below. - Original Message - From: Terry To: amibroker@yahoogroups.com Sent: Monday, October 09, 2006 4:00 PM Subject: RE: [amibroker] Title= question Title is just a variable so, Title = Title + "new stuff"; -- Terry -Original Message-From: [EMAIL PROTECTED]ps.com [mailto:[EMAIL PROTECTED]ps.com] On Behalf Of Chris DePuySent: Monday, October 09, 2006 16:24To: [EMAIL PROTECTED]ps.comSubject: [amibroker] Title= question It seems like Herman used two separate Title= commands here, one for the text up on top and another inside the T=0 loop that follows. How do you make so the second Title= command doesn't just supersede the one before it? I am blasting this question to the normal amibroker list even though it was initially sent this to the AT list because my question relates to non AT issues. PS: Herman, thanks for the ticker list idea, by the way. - Original Message - From: Herman To: AmiBroker-at@yahoogroups.com Sent: Tuesday, August 29, 2006 2:25 AM Subject: Re: [AmiBroker-at] FW: Re: ONE SECOND REFRESH IS HERE! (was [OT] AT State-Engines) You use a loop to test all the tickers in a watchlist, see example below. I use such loops to calculate RT prices, to place orders, to create display table, etc. I use includes when code is "finished" but somehow my code is never finished :-) Except for debugging I don't usually display chart signals, a table with system status and trades in progress is all I need - see below.TickersTraded = StaticVarGetText("TickersTraded");for( T=0; (Ticker = StrExtract( TickersTraded, T ) ) != ""; T++ ) { TickerLastPrice = GetRTDataForeign("Last",Ticker); ... etc ... }A typical (off-line now) trading screen:best regards,hermanjppt0k wrote: Hello Herman,a couple of questions because I'm not sure I have understood.You have your chart with the system loaded (the system written within or do you use #include?) and then every trading signal that's generated by the system is plotted onto it (plotshapes or else?).But you don't limit this way the trading signals to the current ticker? Or there's a way to run a scan every tick this way?Thanks in advance for you inputs.jHerman wrote: Hello Angelo, Code in an Indicator window executes with each new quote or each second if you use the new function. For me , in real-time trading I want my system to trade as soon as possible after it detects a price change that triggers a trade, not 5 seconds later. As far as i know the AA doesn't do that, also RT systems are hard to debug in the AA as you can't display debugging charts. I use the AA for explorations, backtesting, etc. but not for RT trading. best regards, hermanAngelo wrote: --- In AmiBroker-at@yahoogroups.com mailto:AmiBroker-at%40yahoogroups.com, "Herman" [EMAIL PROTECTED] wrote: I run my trading systems in the Indicator window, this normally refreshes each time a quote comes in Hi Herman, it seems that this is just what I'm looking for (I maen, what I've been asking at http://finance.groups.yahoo.com/group/amibroker/message/100305 http://finance.groups.yahoo.com/group/amibroker/message/100305) . Could you please elaborate a bit more on what exactly means "run a system from the indicator window"? Many thanks, Angelo. __._,_.___ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html SPONSORED LINKS Software support Small business finance Business finance online Business finance training Business finance course Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via ema
[amibroker] barssince question
I am trying to display in an interpretation how many bars have passed since the close crossed a moving average, but I want to use the reference point of the last bar at all times. Using BarsSince, its calculating the bars since the SelectedValue (see my below snippet). Can anyone tell me how to get this to reference bars since last cross relative to the last bar? "bars since c wma long (blue) = "+BarsSince(Cross(C,WMA(C,period))); __._,_.___ Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html SPONSORED LINKS Software support Small business finance Business finance online Business finance training Business finance course Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___