SlideShare a Scribd company logo
1 of 5
AFL2DLL: Conversion of AmiBroker AFL into C/C++ DLL Plugin
(Low cost conversion of AFL to DLL)
Contents:
 Background
 Our Service
o AFL Plugin Development & Training
o Example Plugins
 Magnetic Dynamic Levels Plugin
 Magic Trend Indicator
 Candle Patterns Plugin
 ORB (Open Range Breakout) plugin.
o Theory
 Description of the Library
 Debugging of plugin using Visual Studio Platform
 Example code
o Contact : AFL2DLL@GMAIL.COM
o http://bit.ly/2mQSxGw
Background:
AmiBroker is an advanced technical analysis software developed by the one-man developer genius Dr. Tomasz
Janeczko, and is widely respected financial instrument charting platform - used all over the planet earth!!, to
analyze stocks, futures, options, currencies, funds and various financial instruments. More about AmiBroker and its
features can be found at http://www.amibroker.com/features.html
AmiBroker supports C-Like and Python-Like array-based formula language called AmiBroker Formula
Language in short form AFL which is very powerful and speed/performance optimized and used for
writing simple indicators to complex trading systems. More on how AFL works is given here
http://www.amibroker.com/guide/h_understandafl.html
There are smart AFL programmers cum traders around the globe who want their AFL programs to be converted
into DLL to protect their business/trading logic from clients.
Our Service:
The working AFL code received from the clients will be converted into C DLL which can be used as the AmiBroker
plugin. The conversion process is very fast and the method involves the 99% direct 1-1 mapping of the raw
AFL code into C code. Refer the example below.
The cost of conversion is low with benefits compared to others in this field.
 After conversion, the unprotected DLL, single converted C code (just for reference) of the AFL will be
provided to the clients.
 The Clients if needed can protect their converted DLL using available license managers and distribute it to
their end-users/clients. We will provide guidance/training on protecting the DLL.
 The DLL protection can be either time limited or PC locked or both depending on the client requirements.
Some of the interesting plugins developed using this library.
 Magnetic Dynamic Levels Plugin: This plugin is used to display automatic dynamic intraday
magnetic levels on market opening. The plugin internally uses some specialized algorithms based on
tweaked/modified volatility. This plugin can be used for any heavily traded financial instrument, like index,
stocks, futures, options and commodities & forex.
The plugin exports the single API where AFL writers can call this API from their code.
//<no-of-days>, <time frame>, <algorithim_type>, <index>,<style>,<thickness><ehl_flag>
_MAGIC_LEVELS( 2, inDaily, 0, 2, styleDots, 0, 0);
_MAGIC_LEVELS( 5, inDaily, 2, 2, styleDots, 0, 0);
_MAGIC_LEVELS( 3, inHourly, 2, 2, styleDashed, 0, 0);
Here are the three output 5-minute timeframe charts for NIFTY CALL options and BANKNIFTY for
different dates. The horizontal red and green parallel lines are displayed using the above API calls.
Observe how the width of the parallel lines gets adjusted automatically on market opening and stay intact
till market closing. The algorithm takes care of the GapUp and GapDown opening cases. The market reacts
sharply at these levels. You can observe how these levels can acts as a magnetic support & resistance
levels.
 Magic Trend Indicator: This plugin is used to display a indicator which is used for identify trends in
the market. The below graph shows the indicator output in 15 minutes timeframe chart.
mgiOut = MTI(0,0,0);
mgiColor = IIf(mgiOut, colorDarkGreen, colordarkRed);
Plot(mgiOut, "TI", mgiColor, ParamStyle("Style")|styleDots ,Null, Null, 0, 1, 1);
 Candle Patterns Plugin: This plugin is used for getting the candle pattern of the selected candle.
The plugin internally uses the table based approach and the performance of this plugin is multiple times
better than the raw afl script. Here is the usage and the corresponding chart of the plugin.
//CPA function returns string which is candle pattern of the selected candle.
cndleptrn = CPA();
Title += "n"+cndleptrn;
//Another Use case:
//CPS function returns the individual flags depending input integer/enum parameter
which represents the single candle pattern. The return value is true or false depending on the
selected candle. These flags are used for making trade decisions.
CP_Init();
cp_0 = CPS(CP_NearDoji);
cp_2 = CPS(CP_LongBlackCandle);
cp_6 = CPS(CP_LongWhiteCandle);
cp_26 = CPS(CP_BullishEngulfing);
cp_45 = CPS(CP_StrongBullishHarami);
cp_48 = CPS(CP_TweezerBOTTOM);
cp_49 = CPS(CP_TweezerTOP);
cp_55 = CPS(CP_InvertedHammer2);
cp_13 = CPS(CP_HangingMan);
cp_14 = CPS(CP_Hammer);
cp_29 = CPS(CP_ThreeInsideUpPattern);
cp_13_14 = cp_13 OR cp_14;
 ORB (Open Range Breakout Plugin): This plugin is used for plotting time based parallel lines as
shown in the figure below.
//15 Minutes Range lines:
Plot( C, "Price", colorDefault, styleCandle );
MGORB(in15Minute);
Theory:
Provided highly optimized C/C++library ( on the top of AmiBroker ADK ) which acts as a platform to edit/build
Amibroker AFL scripts. One can virtually “cut and paste” the raw AFL script directly into the C . Since AFL
language is typeless, the only challenging task after copying the script into the C /C++, need t o identify the array
type and number type variables and declare them inside C accordingly. Build the C code and create a DLL. Use it
as a amibroker plugin!.
Features:
 No Managed code
 Say Goodbye to StaticVarSet StaticVarGet (AmiBroker functions) funct ions!!...
 Use structures/classes , unions, static/un-named namespace variables inside C/C++ based AFL
code. Amibroker AFL does not support these.
 Use multithreaded architecture with C/C++ AFL to design trading systems and money management
rules.
 Interface other high performance math libraries with C/C++ based AFL script.
 Interface Artificial Intelligence (Neural network) code and other machine learning code very easily.
 Interface STL library.
 Performance is almost equal and in some cases greater than t hat of AFL scripts.
 MOST importantly debug the AFL code inside Visual Studio! .
 Bypass AmiBroker FrontEnd and route your data to your own charting software by still using
AmiBroker Builtin highly optimized functions.
I spent 9 months effort to develop this bug free library code. Do not try to re-invent the wheel. Use this library
Example: The below graph is displayed on AmiBroker by calling single AFL entry function
RTDF_AFL2C_DEMO1_PLOTOHLC(O,H,L,C) which is implemented inside the C DLL.
The AFL code and its equivalent C/C++ code is given below. Observe the code between _SECTION_BEGIN and _SECTION_END
blocks !! and spot the differences! 
Debugging the Plugin:
The below image show how the debugging session of the plugin is done with the visual studio.
Contact:
Contact AFL2DLL@GMAIL.COM , +91-9986180746 for further details.

More Related Content

What's hot

Price Action Trading - An Introduction
Price Action Trading - An IntroductionPrice Action Trading - An Introduction
Price Action Trading - An IntroductionQuantInsti
 
Trade like pro supply & demand
Trade like pro supply & demandTrade like pro supply & demand
Trade like pro supply & demandalkaserr
 
Psychology of Trading
Psychology of TradingPsychology of Trading
Psychology of Tradingsumeetsj
 
Simple scalping secret strategy
Simple scalping secret strategySimple scalping secret strategy
Simple scalping secret strategyHeri Valiant
 
Market structure and powerful setups
Market structure and powerful setupsMarket structure and powerful setups
Market structure and powerful setupsalkaserr
 
How To Swing Trade Stocks For Consistent Profits
How To Swing Trade Stocks For Consistent ProfitsHow To Swing Trade Stocks For Consistent Profits
How To Swing Trade Stocks For Consistent ProfitsMorpheus Trading Group
 
The simple scalping strategy rules
The simple scalping strategy rules  The simple scalping strategy rules
The simple scalping strategy rules Nasir Tareen
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler DesignAkhil Kaushik
 
SMC structure.pdf
SMC structure.pdfSMC structure.pdf
SMC structure.pdfTan Ngoc
 
Secrets of Price Action Trading
Secrets of Price Action TradingSecrets of Price Action Trading
Secrets of Price Action TradingSyrous Pejman
 
How to Become a Professional Trader
How to Become a Professional TraderHow to Become a Professional Trader
How to Become a Professional Trader My Trading Skills
 
How To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutHow To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutMorpheus Trading Group
 
FOREX SCALPING STRATEGY
FOREX SCALPING STRATEGYFOREX SCALPING STRATEGY
FOREX SCALPING STRATEGYOptionsTekkers
 
High Probability Trading Setups
High Probability Trading SetupsHigh Probability Trading Setups
High Probability Trading Setupsbtrader
 
Trading Essentials.pdf
Trading Essentials.pdfTrading Essentials.pdf
Trading Essentials.pdfnorilynPusa
 

What's hot (20)

Types of Parser
Types of ParserTypes of Parser
Types of Parser
 
Price Action Trading - An Introduction
Price Action Trading - An IntroductionPrice Action Trading - An Introduction
Price Action Trading - An Introduction
 
LR Parsing
LR ParsingLR Parsing
LR Parsing
 
Trade like pro supply & demand
Trade like pro supply & demandTrade like pro supply & demand
Trade like pro supply & demand
 
Psychology of Trading
Psychology of TradingPsychology of Trading
Psychology of Trading
 
Simple scalping secret strategy
Simple scalping secret strategySimple scalping secret strategy
Simple scalping secret strategy
 
Market structure and powerful setups
Market structure and powerful setupsMarket structure and powerful setups
Market structure and powerful setups
 
How To Swing Trade Stocks For Consistent Profits
How To Swing Trade Stocks For Consistent ProfitsHow To Swing Trade Stocks For Consistent Profits
How To Swing Trade Stocks For Consistent Profits
 
HABB.pdf
HABB.pdfHABB.pdf
HABB.pdf
 
The simple scalping strategy rules
The simple scalping strategy rules  The simple scalping strategy rules
The simple scalping strategy rules
 
Straddle Options
Straddle OptionsStraddle Options
Straddle Options
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 
SMC structure.pdf
SMC structure.pdfSMC structure.pdf
SMC structure.pdf
 
Secrets of Price Action Trading
Secrets of Price Action TradingSecrets of Price Action Trading
Secrets of Price Action Trading
 
How to Become a Professional Trader
How to Become a Professional TraderHow to Become a Professional Trader
How to Become a Professional Trader
 
How To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutHow To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They Breakout
 
FOREX SCALPING STRATEGY
FOREX SCALPING STRATEGYFOREX SCALPING STRATEGY
FOREX SCALPING STRATEGY
 
High Probability Trading Setups
High Probability Trading SetupsHigh Probability Trading Setups
High Probability Trading Setups
 
Trading Essentials.pdf
Trading Essentials.pdfTrading Essentials.pdf
Trading Essentials.pdf
 
Battle Dashboard
Battle DashboardBattle Dashboard
Battle Dashboard
 

Viewers also liked

AmiBroker ApplyStop Introduction
AmiBroker ApplyStop IntroductionAmiBroker ApplyStop Introduction
AmiBroker ApplyStop IntroductionThaiQuants
 
Amibroker afl coding 28th atma bengaluru meet
Amibroker afl coding   28th atma bengaluru meetAmibroker afl coding   28th atma bengaluru meet
Amibroker afl coding 28th atma bengaluru meetMarketcalls
 
Understand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerUnderstand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerThaiQuants
 
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...Vishnu Kumar
 
Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Marketcalls
 
Fichasnemotcnicas 141029225008-conversion-gate02
Fichasnemotcnicas 141029225008-conversion-gate02Fichasnemotcnicas 141029225008-conversion-gate02
Fichasnemotcnicas 141029225008-conversion-gate02Diego Martinez
 
Portafolio estudiantil 2017 2018
Portafolio estudiantil 2017 2018Portafolio estudiantil 2017 2018
Portafolio estudiantil 2017 2018Diego Martinez
 
3Com 3C905B-TX-15
3Com 3C905B-TX-153Com 3C905B-TX-15
3Com 3C905B-TX-15savomir
 
Children's presentation1
Children's presentation1Children's presentation1
Children's presentation1Monica Eppinger
 
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...Noviyanti Alawiyah
 
Caderno do professor de geografia 5ª série 6 º ano vol 2
Caderno do professor de geografia 5ª série 6 º ano   vol 2Caderno do professor de geografia 5ª série 6 º ano   vol 2
Caderno do professor de geografia 5ª série 6 º ano vol 2Neide Marques
 
18. Jesús carga la cruz (10-11 a.m)
18. Jesús carga la cruz (10-11 a.m)18. Jesús carga la cruz (10-11 a.m)
18. Jesús carga la cruz (10-11 a.m)Lorena Gomez
 
[패스트캠퍼스] 애자일,누굴 위한 것인가
[패스트캠퍼스] 애자일,누굴 위한 것인가[패스트캠퍼스] 애자일,누굴 위한 것인가
[패스트캠퍼스] 애자일,누굴 위한 것인가FAST CAMPUS
 
[패스트캠퍼스] 애자일에 대한 오해와 진실
[패스트캠퍼스] 애자일에 대한 오해와 진실[패스트캠퍼스] 애자일에 대한 오해와 진실
[패스트캠퍼스] 애자일에 대한 오해와 진실FAST CAMPUS
 
Research Tools for Research Cycle: From SEARCH to DISSEMINATION
Research Tools for Research Cycle: From SEARCH to DISSEMINATIONResearch Tools for Research Cycle: From SEARCH to DISSEMINATION
Research Tools for Research Cycle: From SEARCH to DISSEMINATIONNader Ale Ebrahim
 
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化 ~Amazon Aurora 導入事例紹介~
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化  ~Amazon Aurora 導入事例紹介~[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化  ~Amazon Aurora 導入事例紹介~
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化 ~Amazon Aurora 導入事例紹介~Amazon Web Services Japan
 
28.02фотоотчет профессилнал должен быть здоровым
28.02фотоотчет профессилнал должен быть здоровым28.02фотоотчет профессилнал должен быть здоровым
28.02фотоотчет профессилнал должен быть здоровымшкола
 
TradeZilla - Trading system Design
TradeZilla - Trading system DesignTradeZilla - Trading system Design
TradeZilla - Trading system DesignMarketcalls
 

Viewers also liked (20)

AmiBroker ApplyStop Introduction
AmiBroker ApplyStop IntroductionAmiBroker ApplyStop Introduction
AmiBroker ApplyStop Introduction
 
Amibroker afl coding 28th atma bengaluru meet
Amibroker afl coding   28th atma bengaluru meetAmibroker afl coding   28th atma bengaluru meet
Amibroker afl coding 28th atma bengaluru meet
 
Understand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerUnderstand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBroker
 
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
 
Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014
 
Fichasnemotcnicas 141029225008-conversion-gate02
Fichasnemotcnicas 141029225008-conversion-gate02Fichasnemotcnicas 141029225008-conversion-gate02
Fichasnemotcnicas 141029225008-conversion-gate02
 
Portafolio estudiantil 2017 2018
Portafolio estudiantil 2017 2018Portafolio estudiantil 2017 2018
Portafolio estudiantil 2017 2018
 
3Com 3C905B-TX-15
3Com 3C905B-TX-153Com 3C905B-TX-15
3Com 3C905B-TX-15
 
Children's presentation1
Children's presentation1Children's presentation1
Children's presentation1
 
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...
SI-PI, Noviyanti Alawiyah, Hapzi Ali, Sistem Informasi dalam Kegiatan Bisnis,...
 
Caderno do professor de geografia 5ª série 6 º ano vol 2
Caderno do professor de geografia 5ª série 6 º ano   vol 2Caderno do professor de geografia 5ª série 6 º ano   vol 2
Caderno do professor de geografia 5ª série 6 º ano vol 2
 
18. Jesús carga la cruz (10-11 a.m)
18. Jesús carga la cruz (10-11 a.m)18. Jesús carga la cruz (10-11 a.m)
18. Jesús carga la cruz (10-11 a.m)
 
[패스트캠퍼스] 애자일,누굴 위한 것인가
[패스트캠퍼스] 애자일,누굴 위한 것인가[패스트캠퍼스] 애자일,누굴 위한 것인가
[패스트캠퍼스] 애자일,누굴 위한 것인가
 
[패스트캠퍼스] 애자일에 대한 오해와 진실
[패스트캠퍼스] 애자일에 대한 오해와 진실[패스트캠퍼스] 애자일에 대한 오해와 진실
[패스트캠퍼스] 애자일에 대한 오해와 진실
 
Research Tools for Research Cycle: From SEARCH to DISSEMINATION
Research Tools for Research Cycle: From SEARCH to DISSEMINATIONResearch Tools for Research Cycle: From SEARCH to DISSEMINATION
Research Tools for Research Cycle: From SEARCH to DISSEMINATION
 
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化 ~Amazon Aurora 導入事例紹介~
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化  ~Amazon Aurora 導入事例紹介~[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化  ~Amazon Aurora 導入事例紹介~
[Aurora事例祭り]毎日新聞ニュースサイトをクラウド化 ~Amazon Aurora 導入事例紹介~
 
Technical Analysis Rudramurthy
Technical Analysis   RudramurthyTechnical Analysis   Rudramurthy
Technical Analysis Rudramurthy
 
28.02фотоотчет профессилнал должен быть здоровым
28.02фотоотчет профессилнал должен быть здоровым28.02фотоотчет профессилнал должен быть здоровым
28.02фотоотчет профессилнал должен быть здоровым
 
TradeZilla - Trading system Design
TradeZilla - Trading system DesignTradeZilla - Trading system Design
TradeZilla - Trading system Design
 
Mi quehacer pedagogico
Mi quehacer pedagogicoMi quehacer pedagogico
Mi quehacer pedagogico
 

Similar to AmiBroker AFL to DLL Conversion

Intermediate Representation in Compiler Construction
Intermediate Representation in Compiler ConstructionIntermediate Representation in Compiler Construction
Intermediate Representation in Compiler Constructiontheizm1
 
Writing c code for the 8051
Writing c code for the 8051Writing c code for the 8051
Writing c code for the 8051Quản Minh Tú
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer ToolsMark Billinghurst
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16John Todora
 
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...VLSICS Design
 
The Ring programming language version 1.2 book - Part 59 of 84
The Ring programming language version 1.2 book - Part 59 of 84The Ring programming language version 1.2 book - Part 59 of 84
The Ring programming language version 1.2 book - Part 59 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.4 book - Part 22 of 30
The Ring programming language version 1.4 book - Part 22 of 30The Ring programming language version 1.4 book - Part 22 of 30
The Ring programming language version 1.4 book - Part 22 of 30Mahmoud Samir Fayed
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Embarcados
 
The Ring programming language version 1.3 book - Part 62 of 88
The Ring programming language version 1.3 book - Part 62 of 88The Ring programming language version 1.3 book - Part 62 of 88
The Ring programming language version 1.3 book - Part 62 of 88Mahmoud Samir Fayed
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1Serge Amougou
 
Apex and design pattern
Apex and design patternApex and design pattern
Apex and design patternRosario Renga
 
Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLelliando dias
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfSamiraKids
 

Similar to AmiBroker AFL to DLL Conversion (20)

Intermediate Representation in Compiler Construction
Intermediate Representation in Compiler ConstructionIntermediate Representation in Compiler Construction
Intermediate Representation in Compiler Construction
 
Embedded C.pptx
Embedded C.pptxEmbedded C.pptx
Embedded C.pptx
 
GCC RTL and Machine Description
GCC RTL and Machine DescriptionGCC RTL and Machine Description
GCC RTL and Machine Description
 
Writing c code for the 8051
Writing c code for the 8051Writing c code for the 8051
Writing c code for the 8051
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
PRELIM-Lesson-2.pdf
PRELIM-Lesson-2.pdfPRELIM-Lesson-2.pdf
PRELIM-Lesson-2.pdf
 
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...
MIGHTY MACROS AND POWERFUL PARAMETERS: MAXIMIZING EFFICIENCY AND FLEXIBILITY ...
 
The Ring programming language version 1.2 book - Part 59 of 84
The Ring programming language version 1.2 book - Part 59 of 84The Ring programming language version 1.2 book - Part 59 of 84
The Ring programming language version 1.2 book - Part 59 of 84
 
Altova NIEM keynote
Altova NIEM keynoteAltova NIEM keynote
Altova NIEM keynote
 
The Ring programming language version 1.4 book - Part 22 of 30
The Ring programming language version 1.4 book - Part 22 of 30The Ring programming language version 1.4 book - Part 22 of 30
The Ring programming language version 1.4 book - Part 22 of 30
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
 
The Ring programming language version 1.3 book - Part 62 of 88
The Ring programming language version 1.3 book - Part 62 of 88The Ring programming language version 1.3 book - Part 62 of 88
The Ring programming language version 1.3 book - Part 62 of 88
 
RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1RTI-CODES+ISSS-2012-Submission-1
RTI-CODES+ISSS-2012-Submission-1
 
Apex and design pattern
Apex and design patternApex and design pattern
Apex and design pattern
 
Model Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UMLModel Driven Architecture and eXecutable UML
Model Driven Architecture and eXecutable UML
 
Verilog
VerilogVerilog
Verilog
 
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdfJIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
JIT Spraying Never Dies - Bypass CFG By Leveraging WARP Shader JIT Spraying.pdf
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

AmiBroker AFL to DLL Conversion

  • 1. AFL2DLL: Conversion of AmiBroker AFL into C/C++ DLL Plugin (Low cost conversion of AFL to DLL) Contents:  Background  Our Service o AFL Plugin Development & Training o Example Plugins  Magnetic Dynamic Levels Plugin  Magic Trend Indicator  Candle Patterns Plugin  ORB (Open Range Breakout) plugin. o Theory  Description of the Library  Debugging of plugin using Visual Studio Platform  Example code o Contact : AFL2DLL@GMAIL.COM o http://bit.ly/2mQSxGw Background: AmiBroker is an advanced technical analysis software developed by the one-man developer genius Dr. Tomasz Janeczko, and is widely respected financial instrument charting platform - used all over the planet earth!!, to analyze stocks, futures, options, currencies, funds and various financial instruments. More about AmiBroker and its features can be found at http://www.amibroker.com/features.html AmiBroker supports C-Like and Python-Like array-based formula language called AmiBroker Formula Language in short form AFL which is very powerful and speed/performance optimized and used for writing simple indicators to complex trading systems. More on how AFL works is given here http://www.amibroker.com/guide/h_understandafl.html There are smart AFL programmers cum traders around the globe who want their AFL programs to be converted into DLL to protect their business/trading logic from clients. Our Service: The working AFL code received from the clients will be converted into C DLL which can be used as the AmiBroker plugin. The conversion process is very fast and the method involves the 99% direct 1-1 mapping of the raw AFL code into C code. Refer the example below. The cost of conversion is low with benefits compared to others in this field.  After conversion, the unprotected DLL, single converted C code (just for reference) of the AFL will be provided to the clients.  The Clients if needed can protect their converted DLL using available license managers and distribute it to their end-users/clients. We will provide guidance/training on protecting the DLL.  The DLL protection can be either time limited or PC locked or both depending on the client requirements. Some of the interesting plugins developed using this library.  Magnetic Dynamic Levels Plugin: This plugin is used to display automatic dynamic intraday magnetic levels on market opening. The plugin internally uses some specialized algorithms based on tweaked/modified volatility. This plugin can be used for any heavily traded financial instrument, like index, stocks, futures, options and commodities & forex. The plugin exports the single API where AFL writers can call this API from their code. //<no-of-days>, <time frame>, <algorithim_type>, <index>,<style>,<thickness><ehl_flag> _MAGIC_LEVELS( 2, inDaily, 0, 2, styleDots, 0, 0); _MAGIC_LEVELS( 5, inDaily, 2, 2, styleDots, 0, 0); _MAGIC_LEVELS( 3, inHourly, 2, 2, styleDashed, 0, 0); Here are the three output 5-minute timeframe charts for NIFTY CALL options and BANKNIFTY for different dates. The horizontal red and green parallel lines are displayed using the above API calls. Observe how the width of the parallel lines gets adjusted automatically on market opening and stay intact
  • 2. till market closing. The algorithm takes care of the GapUp and GapDown opening cases. The market reacts sharply at these levels. You can observe how these levels can acts as a magnetic support & resistance levels.
  • 3.  Magic Trend Indicator: This plugin is used to display a indicator which is used for identify trends in the market. The below graph shows the indicator output in 15 minutes timeframe chart. mgiOut = MTI(0,0,0); mgiColor = IIf(mgiOut, colorDarkGreen, colordarkRed); Plot(mgiOut, "TI", mgiColor, ParamStyle("Style")|styleDots ,Null, Null, 0, 1, 1);  Candle Patterns Plugin: This plugin is used for getting the candle pattern of the selected candle. The plugin internally uses the table based approach and the performance of this plugin is multiple times better than the raw afl script. Here is the usage and the corresponding chart of the plugin. //CPA function returns string which is candle pattern of the selected candle. cndleptrn = CPA(); Title += "n"+cndleptrn; //Another Use case: //CPS function returns the individual flags depending input integer/enum parameter which represents the single candle pattern. The return value is true or false depending on the selected candle. These flags are used for making trade decisions. CP_Init(); cp_0 = CPS(CP_NearDoji); cp_2 = CPS(CP_LongBlackCandle); cp_6 = CPS(CP_LongWhiteCandle); cp_26 = CPS(CP_BullishEngulfing); cp_45 = CPS(CP_StrongBullishHarami); cp_48 = CPS(CP_TweezerBOTTOM); cp_49 = CPS(CP_TweezerTOP); cp_55 = CPS(CP_InvertedHammer2); cp_13 = CPS(CP_HangingMan); cp_14 = CPS(CP_Hammer); cp_29 = CPS(CP_ThreeInsideUpPattern); cp_13_14 = cp_13 OR cp_14;
  • 4.  ORB (Open Range Breakout Plugin): This plugin is used for plotting time based parallel lines as shown in the figure below. //15 Minutes Range lines: Plot( C, "Price", colorDefault, styleCandle ); MGORB(in15Minute); Theory: Provided highly optimized C/C++library ( on the top of AmiBroker ADK ) which acts as a platform to edit/build Amibroker AFL scripts. One can virtually “cut and paste” the raw AFL script directly into the C . Since AFL language is typeless, the only challenging task after copying the script into the C /C++, need t o identify the array type and number type variables and declare them inside C accordingly. Build the C code and create a DLL. Use it as a amibroker plugin!. Features:  No Managed code  Say Goodbye to StaticVarSet StaticVarGet (AmiBroker functions) funct ions!!...  Use structures/classes , unions, static/un-named namespace variables inside C/C++ based AFL code. Amibroker AFL does not support these.  Use multithreaded architecture with C/C++ AFL to design trading systems and money management rules.  Interface other high performance math libraries with C/C++ based AFL script.  Interface Artificial Intelligence (Neural network) code and other machine learning code very easily.  Interface STL library.  Performance is almost equal and in some cases greater than t hat of AFL scripts.  MOST importantly debug the AFL code inside Visual Studio! .  Bypass AmiBroker FrontEnd and route your data to your own charting software by still using AmiBroker Builtin highly optimized functions. I spent 9 months effort to develop this bug free library code. Do not try to re-invent the wheel. Use this library Example: The below graph is displayed on AmiBroker by calling single AFL entry function RTDF_AFL2C_DEMO1_PLOTOHLC(O,H,L,C) which is implemented inside the C DLL.
  • 5. The AFL code and its equivalent C/C++ code is given below. Observe the code between _SECTION_BEGIN and _SECTION_END blocks !! and spot the differences!  Debugging the Plugin: The below image show how the debugging session of the plugin is done with the visual studio. Contact: Contact AFL2DLL@GMAIL.COM , +91-9986180746 for further details.