In trying build the MSR indicator introduced by David Varadi for Amibroker, I run into a shortcoming of the Amibroker Formula Language (AFL). The language does not allow for the Median() calculation over 3 price arrays (in this H,L,C). After several false attempts in AFL and consulting various sources of help, I decided to accept my fait and build my first .dll for Amibroker to calculate the Median across 2 Arrays or the Median across 3 Arrays.
Below are instructions to Download & Install.
Have fun with it!
– QD –
Instructions to install:
1. Download the QuantingDutchman.dll
2. As WordPress does not allow .dll or .zip files to be uploaded, you should change the extension from .doc to .dll.
3. Place the quantingdutchman.dll in the plugin folder of Amibroker
How to use:
Two functions are provided QDMedian2(x,y,period) and QDMedian3(x,y,z,period), where x,y,z are arrays and period is the amount of bars taken into account to calculate the median.
Sample code: qdmed2=QDMedian2(C,H,10); qdmed3=QDMedian3(C,L,H,10); Plot(qdmed2,"QDMedian2",colorBlue); Plot(qdmed3,"QDMedian3",colorRed);
Hmm… My Ami doesn’t see the dll. Even when I unload and load. Any thoughts?
J
Hi Michel,
just wondering if including the required percentile as an extra input variable is a big pain…that would allow to get median value anyway (percentile = 50) but also more flexible for other use (like the latest dv’s DSR – http://cssanalytics.wordpress.com/2010/11/01/another-short-term-trend-indicator-dsr-distribution-skew-versus-range/)
paolo
Hi Paolo, let me check the code if this is possible in a quick fix. QD
Sounds great.
Anyway I have the same issue as John…my Ami doesn’t see the plug-in.
Paolo
Hi Paolo, what OS version + AB version are you running?
QD
Vista + AB 5.30.4
paolo
mmm, I run W7-64bits + AB 5.30.1
Maybe it has to do with the 64bits?
QD
I’m on Windows 7 64-bit, Ami 5.30.4. It doesn’t recognize the plug-in either.
-Chris
I have not clue why it is not working it is working for me. As it looks like it is AB related, maybe you can try the support from Amibroker?
QD
It would be nice to know if all readers have trouble with the plug-in, or that it works with other readers. So would someone that has the plugin loaded and working please reply to this comment ?
QD
Guys, I just saw Tomasz comment in the Amibroker users group. He is explaining that when .dll is created with Visual C++ 2005 the user shoulld have the VC++ 2005 runtime libraries installed. As I did build the dll in VC++2005 I recommend you to download these and to install them.
QD
Q,
Don’t know if you tried this or not but rename your dll in Ami, download from the link and see if Ami sees it and it works. Maybe something on the upload or download.
J
I downloaded and installed the VC++ 2005 runtime libraries. Ami still doesn’t see the dll.
j
Same here. I spent a lot of time trying to figure this out. I even uninstalled all previous VC ++ 2005 runtime libraries and re-installed the newest ones. No luck for me.
Chris
John, Chris,
– blush-
ehm, I have made a small but maybe significant mistake. I am using VC++ 2010 express to create the dll.
So could you try downloading 2010 libraries.
QD
no way, I have installed vc++ 2010 libraries from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en but still not working
paolo
Yes , even i am facing same problem..amibroker dosent see this Dll,
it will bettrer if you upload .DLL on 4shared or rapidshare.
sorry for trouble , but this will save everyones time
Thank you
Just to be clear you need to change the extension of the downloaded file to .dll
If you do this, than Amibroker should see it. If Amibroker does not see it, uploading to 4shared won’t help either.
QD
I never got this dll to work. Anyone get it to work?
j
John, did you try the new version?
QD,
It worked on Vista, not on win 2k.
regards,
I am intrested – how you make this dll? i want to add some c++ project to amibrocker, what i neeed to do?
Sergey, start with downloading the Amibroker SDK. It is available at the amibroker site. The kit contains a file that explains .dll creation.
Hope this helps, QD
QD,
Yap already reading tutorial there. Thanks!
BTW – just intresting could you share that part of code for external function in dll creating? May be even in different post – i think a lot of people will be intrested in adding their own fast function to ami, and how easy they can do it – just past copy your text add math – complide- add dll go =)
QD,
Thanks for putting this together and releasing to the public!
Works well on my system: Windows 7 32bit, Amibroker 5.00.1.