This is a very simplistic tutorial which explains how to create your own Amibroker DLL Plugin using Dot Net for Amibroker. .Net for Amibroker is a 3rd Party SDK to Amibroker which you can use to create plugins to hide your secret afl codes, creating optimizers, data source plugins and it supports all programmable features of AmiBroker.
Who Should go for DLL Plugin?
1)By default Amibroker doesn’t have AFL source code protection mechanism. If you are planning to secure your secret mathematical model from others or license it and sell it to your customers.
2)Planning for Automation in Amibroker (Report Generation, Data Plugin Creation, GUI based automation). For Example TradeSender is amibroker automation program which push notification alerts to your Android Smart Phone.
Dot net for Amibroker comes with three edition(Developer, Standard and Free Edition). And the Developer Edition comes with Default templates. If you are planning to test it out then it is recommended to Install Developer Edition. .NET for AmiBroker – Developer Edition and .NET for AmiBroker – Standard Edition have a 30 days trial period. You need to have the following Skill Sets and Tools listed below
1)Amibroker Software
2)Microsoft Visual Studio. You can try out the visual studio community edition if you are an individual developer and can create paid or free apps. And Organizations can use it for contributing to open source projects, Research or in a classroom learning environment. Visual Studio Community 2013 includes all the great functionality of Visual Studio Professional 2013, designed and optimized for individual developers, students, open source contributors, and small teams.
3)Dot Net SDK for Amibroker
3)Knowledge on Amibroker AFL Programming
4)Knowledge on VC# or Visual Studio and SDK concepts.
Steps to Create your First Amibroker Plugin
1)Download the Dot Net SDK for Amibroker according to your 32bit or 64bit Amibroker Edition and Amibroker Version.
2)Open Visual Studio-> Goto New Project
3)On the Left Side Pane Goto Tempaltes -> Visual C# -> Amibroker and select Amibroker Plugin template on the right side pane
4)Now select the name of the plugin in this example it is SimplePlugin as shown below and press Ok Button
5)After Pressing OK it opens the default sample template which is nothing but a simple moving average function as shown below. Instead you can write your own custom functions which has to be hidden from the public.
6)Now Build the Solution or Alternatively you can press the key CTRL+SHIFT+B
This attempt will create the dll plugin files under /Amibroker/.Net for Amibroker/Assemblies where are your converted dll files has to be placed.
The Build attempt It also creates the converted AFL file which refers the dll secret functions. The AFL files are stored under /amibroker/formulas/.Net for Amibroker/SimplePlugin as shown below.
You can notice that now SimplePluginFunc1(Close, 5); is highlighted in blue text which means amibroker recognizes the function now and refers the custom dll files.
Bingo Now you are done and now you can use the custom secret function in your regular afl files and your logic always remains hidden in the dll functions. Sample AFL shown below which plots the simple moving average which refers the secret logic SimplePluginFunc1
For creating your own custom functions it is recommended go thro the tutorials in .Net SDK for Amibroker. It is recommended to be familiar with Amibroker, Visual Studio(C#, VB.Net) and .Net SDK Functions.
Now to License your DLL files and sell it to customers with Hardware Protection Lock or with expiry dates and licensed your .Net dll plugin by commercial protection tools like IntelliLock, CliSecure Licensing, .NET Licensing Pro, etc
Related Readings and Observations
The post How to Create Your First Amibroker DLL Plugin? appeared first on Marketcalls.