afl to dll - AmiBroker | futures.io
futures io futures trading


afl to dll
Started: by sr114 Views / Replies:7,283 / 14
Last Reply: Attachments:4

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 4  
 
Thread Tools Search this Thread
 

afl to dll

  #1 (permalink)
Trading Apprentice
Kolkata+India
 
Futures Experience: Intermediate
Platform: amibroker
Favorite Futures: index,gold
 
Posts: 27 since Aug 2012
Thanks: 10 given, 1 received

afl to dll

Hello Forum

is there any easy way to convert the afl to a dll or plugin?

can any 1 elaborate the process of the conversion?

what 1 have to do for this conversion?

regards and thanks
sr

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Asheville, North Carolina
 
Futures Experience: Advanced
Platform: AmiBroker, Dynamic Trader, Metastock, FreeStockCharts, TradingView
Favorite Futures: stocks, options
 
Posts: 24 since Sep 2010
Thanks: 1 given, 15 received

Download the SDK (software development kit). The Users Guide has some helpful information and you can get more by joining the AmiBroker DLL Yahoo Group.

Reply With Quote
The following 2 users say Thank You to colion for this post:
 
  #3 (permalink)
Trading Apprentice
Kolkata+India
 
Futures Experience: Intermediate
Platform: amibroker
Favorite Futures: index,gold
 
Posts: 27 since Aug 2012
Thanks: 10 given, 1 received

importing iods in real time in amibroker


deleted - duplicate post


Last edited by sr114; October 15th, 2012 at 03:55 AM.
Reply With Quote
 
  #4 (permalink)
Banned: Previously banned user, now re-banned
London/UK
 
Futures Experience: Advanced
Platform: AmiBroker
Favorite Futures: Any
 
Posts: 56 since Apr 2013
Thanks: 0 given, 12 received


sr114 View Post
Hello Forum

is there any easy way to convert the afl to a dll or plugin?

can any 1 elaborate the process of the conversion?

what 1 have to do for this conversion?

regards and thanks
sr


Learn C/C++/.NET
There are AmiBroker SDKs for all those languages.
As a tool for creation you would need MS Visual Studio or some free ones.

Reply With Quote
 
  #5 (permalink)
Banned: Previously banned user, now re-banned
London/UK
 
Futures Experience: Advanced
Platform: AmiBroker
Favorite Futures: Any
 
Posts: 56 since Apr 2013
Thanks: 0 given, 12 received

Futures Edge on FIO
As I'm not good in C/C++ here is a simple example showing the difference between AFL and .NET for AmiBroker.

The code plots a simple price graph plus simple title.

First pic shows AFL version second one shows the same in C#. To plot the C# example after compilation one just needs to call PlottestProc(); in AFL.

As you can see in the example there is not much difference between both versions.

Attached Thumbnails
afl to dll-afl.png   afl to dll-c-.png  
Reply With Quote
 
  #6 (permalink)
Trading Apprentice
jakarta+indonesia
 
Futures Experience: Beginner
Platform: meta trader
Favorite Futures: stock
 
Posts: 2 since Apr 2013
Thanks: 0 given, 0 received

mr


sr114 View Post
Hello Forum

is there any easy way to convert the afl to a dll or plugin?

can any 1 elaborate the process of the conversion?

what 1 have to do for this conversion?

regards and thanks
sr

I want to convert afl programming to DLL(C++ programming)

// Trendlines AFL code by Edward Pottasch, Mar 2013
xx=BarIndex();x=xx;Lx=LastValue(x);
nbar=Param("N Pivot Bars",5,2,50,1);
npiv=Param("number of pivots",2,1,5,1);
tf=Param("Time Frame (min)",1,1,10080,1);tfrm=in1Minute*tf;
CleanPivots=ParamToggle("Filter Pivots","No|Yes",1);
PivotSymmetry=ParamToggle("Symmetric Pivots","No|Yes",0);

TimeFrameSet(tfrm);
if(PivotSymmetry)
{
fc=1;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
}
else
{
fc=2;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
}
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);

if(CleanPivots)
{
pk=IIf((ph0>=ph1 AND tx0>px0 AND px0!=px1)
OR (ph1<ph2 AND px2>tx1)
OR (ph0>=ph1 AND tx0<px0 AND tx0==tx1 AND px0!=px1)
,False,pk);
tr=IIf((tl0<=tl1 AND px0>tx0 AND tx0!=tx1)
OR (tl1>tl2 AND tx2>px1)
OR (tl0<=tl1 AND px0<tx0 AND px0==px1 AND tx0!=tx1)
,False,tr);
}

pkh=IIf(pk,H,Null);trl=IIf(tr,L,Null);
TimeFrameRestore();
fact=Nz(Max(tfrm/60,Interval()/60)/(Interval()/60));
if(fact==0)fact=1;
Lkbk=Nz(tfrm/Interval());
if(Lkbk>1)
{
pk=TimeFrameExpand(pk,tfrm,expandFirst);
pkh=TimeFrameExpand(pkh,tfrm,expandFirst);
pkhs=IIf(!IsEmpty(pkh),1,0);pkhs=pkhs-Ref(pkhs,-1);
pk=pk AND H==pkh;
cond1=Sum(pk,BarsSince(pkhs==1)+1)==1 AND pk;
pk=pk AND cond1;

tr=TimeFrameExpand(tr,tfrm,expandFirst);
trl=TimeFrameExpand(trl,tfrm,expandFirst);
trls=IIf(!IsEmpty(trl),1,0);trls=trls-Ref(trls,-1);
tr=tr AND L==trl;
cond1=Sum(tr,BarsSince(trls==1)+1)==1 AND tr;
tr=tr AND cond1;
}

SetChartOptions(0,chartShowDates);
SetBarFillColor(IIf(C>O,colorBrightGreen,IIf(C<=O,colorRed,colorLightGrey)));
Plot(C,"\nPrice",IIf(C>O,ColorRGB(0,255,0),IIf(C<=O,ColorRGB(255,0,0),colorLightGrey)),64,0,0,0,0);
PlotShapes(shapeSmallCircle*tr,colorGreen,0,L,-10);
PlotShapes(shapeSmallCircle*pk,colorRed,0,H,10);

for (i=1;i<=npiv;i++)
{
y0=ValueWhen(tr,L,i-1);
y1=ValueWhen(tr,L,i);
x0=ValueWhen(tr,xx,i-1);
x1=ValueWhen(tr,xx,i);
aa=(y0-y1)/(x0-x1);
ls1=aa*(xx-x1)+y1;
dls1=ls1-Ref(ls1,-1);
ls1=IIf(dls1<0,Null,ls1);
if(i==1) Plot(ls1,"",colorBrightGreen,styleLine|styleNoRescale,0,0,0,1);
if(i>1)
{
ls1=IIf(tr,Null,ls1);
Plot(ls1,"",colorDarkGreen,styleNoLine|styleDots|styleThick|styleNoRescale,0,0,0,1);
}
y0=ValueWhen(pk,H,i-1);
y1=ValueWhen(pk,H,i);
x0=ValueWhen(pk,xx,i-1);
x1=ValueWhen(pk,xx,i);
aa=(y0-y1)/(x0-x1);
hs1=aa*(xx-x1)+y1;
dhs1=hs1-Ref(hs1,-1);
hs1=IIf(dhs1>0,Null,hs1);
if(i==1) Plot(hs1,"",colorRed,styleLine|styleNoRescale,0,0,0,1);
if(i>1)
{
hs1=IIf(pk,Null,hs1);
Plot(hs1,"",colorOrange,styleNoLine|styleDots|styleThick|styleNoRescale,0,0,0,1);
}
}

Attached Files
Register to download File Type: docx afl a.docx (16.6 KB, 33 views)
Reply With Quote
 
  #7 (permalink)
Banned: Previously banned user, now re-banned
London/UK
 
Futures Experience: Advanced
Platform: AmiBroker
Favorite Futures: Any
 
Posts: 56 since Apr 2013
Thanks: 0 given, 12 received


murtiabcde View Post
I want to convert afl programming to DLL(C++ programming)

You wanna convert it. And why don't you do it then? Where is the problem? What's the message?
Why do you wanna convert it anyway? I don't see any reason for it.
Last but not least I hope you don't wanna sell it by using your own name. Don't get me wrong I don't wanna imply anything but it looks a bit suspicious to me.


Another tip, next time please use code tags to insert code. Thanks!


Last edited by badabingbadaboom; April 13th, 2013 at 05:07 AM.
Reply With Quote
 
  #8 (permalink)
Trading Apprentice
jakarta+indonesia
 
Futures Experience: Beginner
Platform: meta trader
Favorite Futures: stock
 
Posts: 2 since Apr 2013
Thanks: 0 given, 0 received


badabingbadaboom View Post
You wanna convert it. And why don't you do it then? Where is the problem? What's the message?
Why do you wanna convert it anyway? I don't see any reason for it.
Last but not least I hope you don't wanna sell it by using your own name. Don't get me wrong I don't wanna imply anything but it looks a bit suspicious to me.


Another tip, next time please use code tags to insert code. Thanks!

this is afl amiboker programming ,and want to convert to DLL (C++ programmig ):

// Trendlines AFL code by Edward Pottasch, Mar 2013
xx=BarIndex();x=xx;Lx=LastValue(x);
nbar=Param("N Pivot Bars",5,2,50,1);
npiv=Param("number of pivots",2,1,5,1);
tf=Param("Time Frame (min)",1,1,10080,1);tfrm=in1Minute*tf;
CleanPivots=ParamToggle("Filter Pivots","No|Yes",1);
PivotSymmetry=ParamToggle("Symmetric Pivots","No|Yes",0);

TimeFrameSet(tfrm);
if(PivotSymmetry)
{
fc=1;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
}
else
{
fc=2;
pk=H>Ref(HHV(H,nbar*fc),-1) AND Ref(HHV(H,nbar),nbar)<=H;
tr=L<Ref(LLV(L,nbar*fc),-1) AND Ref(LLV(L,nbar),nbar)>=L;
}
px0=ValueWhen(pk,x,0); tx0=ValueWhen(tr,x,0);
px1=ValueWhen(pk,x,1); tx1=ValueWhen(tr,x,1);
px2=ValueWhen(pk,x,2); tx2=ValueWhen(tr,x,2);
ph0=ValueWhen(pk,H,0); tl0=ValueWhen(tr,L,0);
ph1=ValueWhen(pk,H,1); tl1=ValueWhen(tr,L,1);
ph2=ValueWhen(pk,H,2); tl2=ValueWhen(tr,L,2);

if(CleanPivots)
{
pk=IIf((ph0>=ph1 AND tx0>px0 AND px0!=px1)
OR (ph1<ph2 AND px2>tx1)
OR (ph0>=ph1 AND tx0<px0 AND tx0==tx1 AND px0!=px1)
,False,pk);
tr=IIf((tl0<=tl1 AND px0>tx0 AND tx0!=tx1)
OR (tl1>tl2 AND tx2>px1)
OR (tl0<=tl1 AND px0<tx0 AND px0==px1 AND tx0!=tx1)
,False,tr);
}

pkh=IIf(pk,H,Null);trl=IIf(tr,L,Null);
TimeFrameRestore();
fact=Nz(Max(tfrm/60,Interval()/60)/(Interval()/60));
if(fact==0)fact=1;
Lkbk=Nz(tfrm/Interval());
if(Lkbk>1)
{
pk=TimeFrameExpand(pk,tfrm,expandFirst);
pkh=TimeFrameExpand(pkh,tfrm,expandFirst);
pkhs=IIf(!IsEmpty(pkh),1,0);pkhs=pkhs-Ref(pkhs,-1);
pk=pk AND H==pkh;
cond1=Sum(pk,BarsSince(pkhs==1)+1)==1 AND pk;
pk=pk AND cond1;

tr=TimeFrameExpand(tr,tfrm,expandFirst);
trl=TimeFrameExpand(trl,tfrm,expandFirst);
trls=IIf(!IsEmpty(trl),1,0);trls=trls-Ref(trls,-1);
tr=tr AND L==trl;
cond1=Sum(tr,BarsSince(trls==1)+1)==1 AND tr;
tr=tr AND cond1;
}

SetChartOptions(0,chartShowDates);
SetBarFillColor(IIf(C>O,colorBrightGreen,IIf(C<=O,colorRed,colorLightGrey)));
Plot(C,"\nPrice",IIf(C>O,ColorRGB(0,255,0),IIf(C<=O,ColorRGB(255,0,0),colorLightGrey)),64,0,0,0,0);
PlotShapes(shapeSmallCircle*tr,colorGreen,0,L,-10);
PlotShapes(shapeSmallCircle*pk,colorRed,0,H,10);

for (i=1;i<=npiv;i++)
{
y0=ValueWhen(tr,L,i-1);
y1=ValueWhen(tr,L,i);
x0=ValueWhen(tr,xx,i-1);
x1=ValueWhen(tr,xx,i);
aa=(y0-y1)/(x0-x1);
ls1=aa*(xx-x1)+y1;
dls1=ls1-Ref(ls1,-1);
ls1=IIf(dls1<0,Null,ls1);
if(i==1) Plot(ls1,"",colorBrightGreen,styleLine|styleNoRescale,0,0,0,1);
if(i>1)
{
ls1=IIf(tr,Null,ls1);
Plot(ls1,"",colorDarkGreen,styleNoLine|styleDots|styleThick|styleNoRescale,0,0,0,1);
}
y0=ValueWhen(pk,H,i-1);
y1=ValueWhen(pk,H,i);
x0=ValueWhen(pk,xx,i-1);
x1=ValueWhen(pk,xx,i);
aa=(y0-y1)/(x0-x1);
hs1=aa*(xx-x1)+y1;
dhs1=hs1-Ref(hs1,-1);
hs1=IIf(dhs1>0,Null,hs1);
if(i==1) Plot(hs1,"",colorRed,styleLine|styleNoRescale,0,0,0,1);
if(i>1)
{
hs1=IIf(pk,Null,hs1);
Plot(hs1,"",colorOrange,styleNoLine|styleDots|styleThick|styleNoRescale,0,0,0,1);
}
}

Attached Files
Register to download File Type: docx afl a.docx (16.6 KB, 11 views)
Reply With Quote
 
  #9 (permalink)
Banned: Previously banned user, now re-banned
London/UK
 
Futures Experience: Advanced
Platform: AmiBroker
Favorite Futures: Any
 
Posts: 56 since Apr 2013
Thanks: 0 given, 12 received

Yeah, I've already got it the first time around. No reason to post the same story with same code. You want to convert it. Then go ahead, good luck and happy coding ...

Reply With Quote
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 45,801 since Jun 2009
Thanks: 29,097 given, 81,372 received



badabingbadaboom View Post
Yeah, I've already got it the first time around. No reason to post the same story with same code. You want to convert it. Then go ahead, good luck and happy coding ...

Moderator Note


Unhelpful replies to users seeking assistance such as this are not welcome on futures.io (formerly BMT). Do not do it again.

Mike



Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Reply



futures io > > > > afl to dll

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

PTMC Protrader Platform First Look w/Sergey Sokolov

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
ELEXCEL.dll: Where to download arjfca EasyLanguage Programming 4 July 1st, 2015 07:13 AM
Downloadable DLL's on the site Big Mike Feedback and Announcements 16 October 8th, 2012 12:14 AM
additional references dll timmyb NinjaTrader Programming 34 May 3rd, 2012 11:38 PM


All times are GMT -4. The time now is 09:39 PM.

no new posts
Page generated 2017-03-25 in 0.15 seconds with 20 queries on phoenix via your IP 54.145.198.123