HOW SOLID IS AUTOMATION IN AMIBROKER? - futures io
futures io futures trading



HOW SOLID IS AUTOMATION IN AMIBROKER?


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one alex27 with 11 posts (1 thanks)
    2. looks_two JFDerzi with 8 posts (10 thanks)
    3. looks_3 alligator with 2 posts (0 thanks)
    4. looks_4 Balut with 2 posts (0 thanks)
      Best Posters
    1. looks_one JFDerzi with 1.3 thanks per post
    2. looks_two LePulp with 1 thanks per post
    3. looks_3 prouser with 0.5 thanks per post
    4. looks_4 alex27 with 0.1 thanks per post
    1. trending_up 14,059 views
    2. thumb_up 13 thanks given
    3. group 14 followers
    1. forum 32 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

HOW SOLID IS AUTOMATION IN AMIBROKER?

(login for full post details)
  #1 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Hi There,

I have been looking for a reliable and secure platform to automate trading and Amibroker looks like it is,

When I research more t seems a lot of people just use it to backtest and dont fully automate with it?

So for anyone that uses Amibroker to automate, how good is it? and is there anything to be aware of when coding the strategy for automation?


How does it compare to Sierra Charts auto trading and MC.net?

Cheers
Al

Reply With Quote

Journal Challenge February 2021 results (so far):
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(151 thanks from 28 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(110 thanks from 31 posts)
looks_3Wisdom is Emptinessby Mtype
(66 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 15 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received

I don't know Sierra Charts and MC.net, unfortunately. I can't compare.

But I use AB for 5 years now and made my autotrade systems 3 years ago.

Incredible software, you can do about anything you want.
There is no better platform, trust me on that. I have been around a lot: MetaTrader, Ninja... you name it.
I would never use another software and I encourage every one to use AB as well.

I run complex strategies for Swing Trade and Intraday, changing the strategy behavior according to the time of the day, for example.

You only need to know AFL (Amibroker Formula Language).
It is not hard.
In fact, it is pretty fun to learn it specially if you have any coding knowledge, doesn't matter what language.
If you don't, you will have to learn some coding/programming logic and basics.

About the cautions: there ase some.

AB does not send orders to you broker with built in functions.
You most have a DLL made for your broker.
So, this DLL will make some specific functions available and they will be different from broker to broker.

For example, I am in Brazil and trade my futures and stock market.
I have a DLL made with functions created specifically for my broker. It is made by Gerais Trader.

So, if you are in the US, many AB users trade using IB (Interactive Brokers).
IB has a solid DLL with well tested autotrade functions.

Concluding: you most research which broker you would like to use and if there is a DLL allowing AB to interface with it. Is IB good for you?

Also, you will probably need a data feeder (eSignal, IQFeed)...
AB has its AmiQuote and it is very good, you should check it out too.

And, you could you your brokers DDE signal, if you like.
DDE is a Jurassic tech but it is free and does the job. It has no back fill, though.
And, it is kind of slow. It can only send one or two quotes per second, I really don't know and I don't know if that varies with the number of symbols you are getting through the DDE link.

So, another detail: where will your data come from?


There are other points that one most look at when making an autotrade code, but there are about the code itself.
So, I guess it is not the time to get into them.


For example, you most be careful to not send the SAME order over and over.

Ex: Let's imagine someone that is a day trader, trading on 5-minute bars.
He is using moving averages crossovers to get in and out of the market (terrible system, just to make the example easier).

On a given bar the averages will cross and the system most send an order.
Ok.
But this signal will exist as long as the software "stays looking" at that bar. If that is a 5-minute bar, it will be 5-minutes.
So, the code could send this order every time it is executed.
If AB is configure to update the chart every second, the code would run (60*5=300) times.

If you are not careful, you could send 300 orders to the market.
You gotta have a flag to control if that order was already sent or not.

Just for your info, I use tick charts and they are updated on every tick.
So, we are talking about a lot of orders if that basic mistake is made.


I think that is about it.

I hope to see you on AB's users mailing list soon.

Reply With Quote
The following 4 users say Thank You to JFDerzi for this post:
 
(login for full post details)
  #3 (permalink)
Manila
 
 
Posts: 16 since Sep 2014
Thanks: 5 given, 2 received


Amibroker is really a very good charting software.
One can use it to create trading systems
test and optimize everything is made user-friendly.

For automatic Traiding
you can only use interactive Broker
This sends a bad price data.
With many interruptions
What makes a meaningful Traiding impossible.

Sierra Chart has many brokers
to select and you get a good real-time feed.
But to create trading systems, it is made very complicated.
It's all possible, but it takes a long learning periods.

Balut.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Zurich/Switzerland
 
 
Posts: 79 since Oct 2014


Balut View Post
For automatic Traiding
you can only use interactive Broker
This sends a bad price data.
With many interruptions
What makes a meaningful Traiding impossible.

That's an incorrect assumption. There is no price data connection required to trade with IB!
You may use any proper data vendor like IQFeed, esignal, etc and still trade with IB.
Also you may use any broker providing API access you like to. But of course IB is one of the best ones available.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received


prouser View Post
That's an incorrect assumption. There is no price data connection required to trade with IB!
You may use any proper data vendor like IQFeed, esignal, etc and still trade with IB.
Also you may use any broker providing API access you like to. But of course IB is one of the best ones available.

Completely true.

As I wrote, I am in Brazil and an API (DLL to provide trading functions) was specifically created.
We have three big brokers here that have solid APIs.

It is all a matter of doing a little research and see what you gonna need.

Reply With Quote
The following user says Thank You to JFDerzi for this post:
 
(login for full post details)
  #6 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Hi Everyone,

It looks great, have been doing my homework on it, very keen to get a basic system built and take it from there.


I wish it had a few features that make our life easier as traders, Im not a coder not my strength so be good if it was that little bit easier to get up and running with amibroker if your not a coder.


Clean chart trading so you can enter bracket orders nice and easily and see on chart similar to what Sierra Charts have.

Multiple brokers and data linked into it easily like with Multicharts.net - so what mc.net can do you can just have another tab with different broker and different data feed, very easy to turn on and off.


A decent forum, thats easy to chat and navigate to people like you guys, amibroker code is amazing but yahoo groups is a joke for support and I know thats what users wanted before but its holding amibroker back and ease of communicating with other people passionate about amibroker which I am!

Could set up a slack forum in 10 mins and be easier to chat and navigate.

A amibroker Youtube channel, walking through everything on what the platform can do - this would be amazing the ask ozzie guy is great and we need more youtube vids about amibroker.

If you think about it, its the best way to show the power it has and can do.


I heard that Matlab can link to Amibroker, can anyone confirm this?


I think if I can get all the above things sorted amibroker would be the best trading software out there.



Kind regards,

A

ps Im a big amibroker fan so pm if you want to get in touch

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Manila
 
 
Posts: 16 since Sep 2014
Thanks: 5 given, 2 received


prouser View Post
That's an incorrect assumption. There is no price data connection required to trade with IB!
You may use any proper data vendor like IQFeed, esignal, etc and still trade with IB.
Also you may use any broker providing API access you like to. But of course IB is one of the best ones available.

I spoke of the automatic trading with a Trading System.
In other price data very different results come about.
It sounds strange but I've tried it myself.
But you must not believe yes.

Reply With Quote
 
(login for full post details)
  #8 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

This is why,

What ever data feed your going to trade on you need to use it in your testing so you don't get different results.

Most data feeds have a slightly different formula on how they present it - this shows up in tick level data more.

Go with IQ feed, think its the best at the mo for price and quality.

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Zurich/Switzerland
 
 
Posts: 79 since Oct 2014


Balut View Post
I spoke of the automatic trading with a Trading System.
In other price data very different results come about.
It sounds strange but I've tried it myself.
But you must not believe yes.

I was talking about automated trading also!
Once again you may use i.e. IQfeed and still send trades to IB.
So you don't have to use IB data plugin in order to use IBcontroller.
Is it understood now?

Reply With Quote
 
(login for full post details)
  #10 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received



alex27 View Post
ps Im a big amibroker fan so pm if you want to get in touch

I must have more posts to PM someone. Newbie limitations.
That is why I am posting this, to help me achieve 5 posts.

I wrote a big answer to your last post but it didn't get posted.
I believe it was deleted for one matter or another.

Reply With Quote
 
(login for full post details)
  #11 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

I really want to push amibroker to the limit and see what its capable of doing.


Has anyone tried anything crazy like every ticker over 100 yrs of data with some strategy it be interesting to see how quick and powerful you really can push it


Have people linked it to Matlab ?

Reply With Quote
 
(login for full post details)
  #12 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received


alex27 View Post
I really want to push amibroker to the limit and see what its capable of doing.


Has anyone tried anything crazy like every ticker over 100 yrs of data with some strategy it be interesting to see how quick and powerful you really can push it


Have people linked it to Matlab ?

About Matlab: I am not sure.

People have used it with Python to create neural network.

I believe someone used MatLab as well.


About the suggestion of pushing AB

If you code right, using arrays, it will be as fast as possible.

But one speed limitation is the database size.
You can have the size you want but that will take unnecessary time to process.

There is no point of using a lot of years in a database.
As the markets change over time, the strategies should change as well.

In fact, that is the idea of WF (walk forward optimization).

A lot of users believe that store tick by tick on the database is useless.
On a high volume market like ES, it is just unnecessary data to be processed.

A 1-second database would be much smaller with the same accuracy.

What AB can do is much better than processing a century of data (Was there any market data back to 1916?).
It can receive data really fast, process it really fast as well as our code, and, take the decisions necessary.

To do that, it process only the data that matters.
If I am using a 50-period EMA, only the last 50 bars will be computed.

Or, AB can scan all the stock market (in a flash) to see which symbols are with a buy or sell signal, according to the setups programmed.
AB can do that as often as your data arrives (1 time a second, 30 times a minute...).
It is up to your internet connection and Data provider.

Those are the things that really matter to make money on the market.
And that is what AB do.

Reply With Quote
The following 2 users say Thank You to JFDerzi for this post:
 
(login for full post details)
  #13 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Pm'ed you

Is there a portfolio feature so you can a watch list weighted by volume and then which ever futures eg the ES is most liquid it can allocate the daily amount for trading capital?

Reply With Quote
 
(login for full post details)
  #14 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received

Yes, that is possible.

You can balance or rebalance your portfolio by all futures in the Watch list, or only by the futures that had buy or sell signals, or any rule you would like (balance it only for the 8 most liquid future cause those are the ones I will trade).

If you google "amibroker portfolio rebalancing" it will come up with methods of doing that.

Some use AB CBT (custom backtest feature) to do it on the fly, day by day, week by week, you choose. I consider this a advanced feature.

Others use an exploration (analysis / explore) to generate the volume on a time range, balance the portfolio and backtest or enter the positions with this pre-balanced portfolio. I like this last better and this would be a basic to medium feature.

Reply With Quote
The following user says Thank You to JFDerzi for this post:
 
(login for full post details)
  #15 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received

Oops, just I've just remembered.

I answered your PM about 23hs ago.
If there is another PM, I did not receive it.

Reply With Quote
 
(login for full post details)
  #16 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Trying to get hold of your guy that did your api, now email back yet?


Have you got a way to contact him?


I would want the portfolio watch list to update every 1 min or end of trading day.

Sent other pm

Reply With Quote
 
(login for full post details)
  #17 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received

I got his email, phone and skype.

I can PM you (but I just did answer another PM so I can only send another message in 1 hour).


I do not know if talking to him will do any good, but feel free to try.
He make an API for Brazilians brokers interface with AB, via API.

If that is what you have in mind, great.

Reply With Quote
The following user says Thank You to JFDerzi for this post:
 
(login for full post details)
  #18 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

How good is he with Amibroker ?

Got comms with him now

Reply With Quote
 
(login for full post details)
  #19 (permalink)
Belo Horizonte, MG/Brazil
 
 
Posts: 11 since Mar 2015
Thanks: 0 given, 12 received

He is a 10 in 10.

I still did not get what need do you have but he is very good.

For example, he can code your AFL in C++ so Amibroker would run it hundreds of time faster (if its complex).
Instead of taking 0.35ms, it would tack 0.035ms or so.

But, once again, you should get Amibroker, see how it works, see what would you like to do with it and how and, only, them try to make it.

Reply With Quote
The following user says Thank You to JFDerzi for this post:
 
(login for full post details)
  #20 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received


JFDerzi View Post
I got his email, phone and skype.

I can PM you (but I just did answer another PM so I can only send another message in 1 hour).


I do not know if talking to him will do any good, but feel free to try.
He make an API for Brazilians brokers interface with AB, via API.

If that is what you have in mind, great.

Sounds good need to get him on a call, quite busy I think.

Reply With Quote
 
(login for full post details)
  #21 (permalink)
Ludhiana + India
 
 
Posts: 9 since Oct 2015
Thanks: 2 given, 0 received

hey... I m also a big amibroker Fan... And using it for automatic trading in India and its doing fine...

U mentioned abt moving average crossover(He is using moving averages crossovers to get in and out of the market (terrible system, just to make the example easier).) I knw its a terrible system and i wish to knw abt some good systems if u could help me with it...

Reply With Quote
 
(login for full post details)
  #22 (permalink)
Seattle
 
Experience: Intermediate
Platform: MultiCharts 10
Broker: InteractiveBrokers, IQFeed
Trading: ES
 
Posts: 56 since Nov 2015
Thanks: 19 given, 2 received

Hello all,

For me optimization speed is my primary concern. I already use NT7/IB with IQFeed for my current trade setup. Problem is I'm not a programmer. I'm a portfolio hedger turn options day trader turn futures day trader looking to automate. The reason I have used NT7 is the ability to run Bloodhound (no affiliation) and the native NT7 strategy wizard to develop my manual trading style into an automated system. NT7 is god awful slow so any efficient long time period optimization is out. Hence my interest in Amibroker. Do they have a NT7 style strategy wizard or a 3'rd party add on I can purchase that would allow for a point and click type development process?

Any help would be appreciated.

GuppyDRV

PS: How did the FX traders do last week when the dollar took a nose dive? I hope some buying opportunity.

Reply With Quote
 
(login for full post details)
  #23 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Hi Everyone,


Is there any progress on making the autotrading on amibroker with IB any better?

Is it possible to buy calls and puts options on IB with amibroker autotrade ?

Reply With Quote
 
(login for full post details)
  #24 (permalink)
Kolkata+West Bengal+India
 
 
Posts: 3 since Apr 2017
Thanks: 4 given, 1 received

@JF Derzi and all AB experts

I gave up using AB (though I have restarted) for the following reasons, one of which was touched by JF.

1) If you don't want to use crossovers and say, enter by slopes of several indicators, the entry condition will remain valid at every bar and trades will continue to fire within the same bar, even though an entry may have actually been taken (traded) on the first appearance of the signal. This doesn't look easy to handle and is restrictive, to say the least. Fixing the first signal that appears, without allowing it to repaint, may be a solution imo.

2) If I am using 1 hr tf, I may not want to wait till the bar close to enter trade because of a substantial potential loss in profit in a trending market. It is even more risky to wait till close on exit. There should be an option to enter/exit on an "immediate" mode and AB must accept the traded prices as the entry/exit prices.

3) There is virtually no "tutorial" in the usual sense of the term. The vast manual doesn't teach. It's like learning English from a dictionary.

Would love to hear from you!

Reply With Quote
 
(login for full post details)
  #25 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Im with you !

Im not a coder I think its the best backtesting engine out there but its to complicated.


I think if they made it easy to add a autotrade feature and good customer service they would be number 1 in no time.

I feature like MC.net on how to link up brokers nice and easy would be really good and data.


Great platform, but you need a coder to do anything with it.

Kind regards,
A

Reply With Quote
The following user says Thank You to alex27 for this post:
 
(login for full post details)
  #26 (permalink)
Surrey - UK
 
 
Posts: 41 since Sep 2015
Thanks: 12 given, 7 received

Any Ninja coders with Amibroker out there?

Reply With Quote
 
(login for full post details)
  #27 (permalink)
Danbury Connecticut USA
 
 
Posts: 5 since Feb 2014
Thanks: 0 given, 1 received

Hi. I 've been with AB for at least 3 years now and when I am stuck I usually fire off a support ticket to Marcin, wait a couple of days , then reluctantly call my consultant in India for $50/hour. To me, two days is the tipping point where the $50 seems cheap now than waiting another 2 days. So if anyone needs his info, LMK.

EDIT:
Just got off Skype with him, he also does Ninjascript (which he tells me is the "AFL" of ninjatrader). let me know if you need info. His name is Vivek form Bangalore India.. so there is a time difference issue to consider.

Reply With Quote
 
(login for full post details)
  #28 (permalink)
Riga+Latvia
 
 
Posts: 5 since Aug 2017
Thanks: 0 given, 1 received


JFDerzi View Post



For example, you most be careful to not send the SAME order over and over.

Ex: Let's imagine someone that is a day trader, trading on 5-minute bars.
He is using moving averages crossovers to get in and out of the market (terrible system, just to make the example easier).

To avoid sending reapeat orders, is this a code that can be a template for all strategies you trade? I have been trying to find info about this, but unfortunately it is limited.

I have absolutely no previous experience in programming, and AB seems to be made by programmers for programmers.

I find it very strange that AB does not have a built in function to avoid sending repeat orders. For me as a non programmer it takes a hell of a lot of time to learn it.

The same goes for bar completion. If you have a strategy meant for EOD bars, it buys and sells before the bar is completed unless you program it to wait.

Reply With Quote
 
(login for full post details)
  #29 (permalink)
bahrain bahrain
 
 
Posts: 1 since Sep 2017
Thanks: 0 given, 0 received

Hi JF,

I am new to automated trading with amibroker.

After developing my simple strategy, I found that there are multiple buy orders got sent to the market by the same signal generated in Amibroker.

do you have any sample code that got some conditions to prevent this from happening?

I really need any help here.

thank you in advance

Reply With Quote
 
(login for full post details)
  #30 (permalink)
paris france
 
 
Posts: 9 since Sep 2013
Thanks: 7 given, 5 received

There can be two reasons for sending multiple orders.

First your 'Buy/Short' conditions may be true for multiple successive bars. To avoid that write
 
Code
Buy = ExRem(Buy, Sell); Short = ExRem(Short, Cover);
after Buy/Sell etc and before sending orders

Second, your script may be evaluated several times on the same bar due to streaming quotes.
To avoid that, it's recommended to evaluate your script in Scan using Auto-Repeat with the convenient period (adjust
period to timeframe e.g if you trade on 1min bar set Auto-Repeat to 1min). Read
AmiBroker Knowledge Base » How to setup automatic periodic scans & explorations

Note that you can prevent sending multiple orders by using the technique described here
AmiBroker Users? Knowledge Base » Preventing Repeat Orders and Whipsaws

Finally test your script in simulation in various conditions before going live. Good luck.

Reply With Quote
 
(login for full post details)
  #31 (permalink)
Newport Beach CA
 
 
Posts: 13 since Feb 2011
Thanks: 2 given, 2 received

my 2 cents: You won't find a better backtesting platform as Amibroker. It is great piece of software. Highly customizable, stable, very fast and optimized C++ based. Way faster than institutional grade plataforms such as Deltix and QuantHouse. Amibroker is my prefered platform for prototyping (single and portfolio strategies). Moreover, you can call R and javascript form AB.

That said, it is not plug and play for real-time trading such as MC, NT, SC. There is a lot of coding between the backtest and live production. But depending on how good coder you are, there is no limit what can you achieve with AB.

Reply With Quote
The following user says Thank You to LePulp for this post:
 
(login for full post details)
  #32 (permalink)
Washington DC
 
 
Posts: 5 since Sep 2018
Thanks: 2 given, 2 received

I gave up using AB (though I have restarted) for those reasons, one of which was touched by JF.

Reply With Quote
 
(login for full post details)
  #33 (permalink)
paris france
 
 
Posts: 9 since Sep 2013
Thanks: 7 given, 5 received

This story about repeated orders is ridiculous.
If you do things as recommended by the manual, using Exploration, you can't unintentionnally trigger multiple orders for the same signal.
Amibroker users can/should read articles about Autotrading, e.g
https://www.amibroker.com/library/detail.php?id=1186
which describes and give an example of autotrading using an exploration.
All of this is described in the User's guide.
And you barely need to know how to code.

Even if you insist on doing things the wrong way, there are solutions to avoid repetition (described in Amibroker Users' Knowledge Base).
https://www.amibroker.org/userkb/
Hint: use a static variable to store before last bar timestamp.

Reply With Quote


futures io Trading Community Platforms and Indicators > HOW SOLID IS AUTOMATION IN AMIBROKER?


Last Updated on January 7, 2019


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Identifying Setups & Targets Using Profile Charts w/Trevor & Tradovate

Feb 25
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts