Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
ArshT, I am over my head at the moment in trying to grasp .NET, SDK, API, DDE; and the pros / cons of each. I just know that I need data in AB, or MC for that matter, and they help make that happen...
Speaking of which, there seems to some healthy back-and-forth here between the two (AB and MC). Appropriate, given the thread's title...
I'm in somewhat trial stages with each, so welcome the debate / discussion, so long as it's based upon facts and not mis-information. While AB has the majority of my interest at this point, simply because I've played with MCDT for several months already, I remain perplexed why AB is not more popular on this forum. I can see if AB was recently released, but it seems to have been out for a decade or more. If indeed it is a more robust, faster solution, and less expensive too, I don't see threads about people abandoning NT and other platforms for AB. I see those about leaving for MC though.
I'm just being frank, shooting from the hip. Let me take some guesses... Maybe because AB is, or was not geared toward futures (the majority on this forum seem to be into futures)? Maybe because AFL is not easy to learn, or as easy as compared to EL? Heck, I don't know. I've also read that AFL is not all the difficult to learn, and once it is grasped, less code is needed to accomplish a task. It seems undeniable that AB has a great product though, especially for the price.
BigMike (if you are reading), is there a reason you have not invested time into AB?
Well things must have changed since I used AB. In the afl code, i code do a buy @ the high of the previous bar and not know whether i was in a trade or not. I had to manually check and keep a record so that i could then create manual stoploss, trailing and time based stops.
If in afl code there is now an equivalent to mc marketposition flag, then I stand corrected.
Arsht
Does AB now do intrabar analysis during testing ie on a 5min bar can it look down to 1min resolution inside the bar or down to tick data inside the bar? This can make a huge difference to the validity of the system under test. A major flaw with NT.
ArshT,
I politely ask, perhaps you can show me sample AFL code I need to put into a System that will allow me to detect when I'm in a trade.
I just updated my Amibroker to the latest version and still cannot find a reference.
MarketPosition is an internal variable that displays the number of contracts/shares that we are long or short.
It is maintained by MC.
Using the above example, if after 5 ticks profit, I decide to Sell 1 contract, MarketPosition would now = 2.
Again MC automatically maintains how many contracts I have remaining in my position.
ArshT, I bow to your knowledge.
What is the AFL System code for AB to do this style of thing ???
You can ask the same question in regards to compare McDonalds and French haute cuisine. Why do more people go to McDonalds? Or why do more people watch American Idol? To be honest I wasn't aware of this board before. And so on. You get the joke.
Why do more people use NT or MT4? Well, MT4 is fully for free. NT is for free if you don't trade through it. So this could be one of many reasons. To be honest I don't care. To each their own. There are many users using AB too. And I have seen many coming from NT, MT and MC. All I can say is that it's the most flexible software I have been using so far and I like its handling the most. The language is quite easy (IMO) and if you don't like AFL you can use C/C++/C#... to write plugins. Also can use jscript and vbscript within AFL code. Amibroker has been concepted for Stocks, Futures Forex, and so on. You can use it for auto trading or for discretionary trading (one flaw is that only Interactive Brokers and introducing brokers of IAB are provided for trading after standard installation. Using other brokers for trading you need to write your own environments or need others to create them for you). Data feed plugins available after standard installation are Esignal, IQ feed, CQG, MyTrack, Yahoo/Google/MSN, Quotetracker's feeds (development of Quotetracker has ended though, also it's not supported by Ameritrade anymore), DDE, Metastock, Excel. There are some other plugins like MT4 plugin ( recently I've also seen a solution to send trades from AB to MT4), R-plugin and so on. As mentioned ADK provides own connections to any source.
Since the topic of this thread is backtesting here is a comparison of a former new AB user
It hasn't changed because custom backtester interface has been there for years. I think Tomasz has given the answer already. Regarding code example... I'll see what I can do. Today I'm too tired for more
I just want to Buy 3 contracts at the current high plus a couple of points and know when I'm in so that I can sell 1 at a profit target of 5 points and sell the remainder at a profit target of 10 points.
And have a StopLoss (This could have been a StopLoss connected to a ATR calc)
Why do I need a custom Backtester to do this?
You do your Buying and Selling in the System.
ArshT, I agree with Tim that repeatability is very important. I lose all faith if I cannot reproduce the results... The broker relationships / options are indeed a short-coming for me; and if anything prevents me from moving forward with AB, that would seem to be it... I really hope that won't be the case.
If you had to recommend one good source to learn AFL, what would it be?
Tony,
Ensure you don't confuse TS (TradeStation) with MC (Multicharts). They are two different platforms and companies.
Part of the reason I changed to MC was the ease of programming in EasyLanguage.
You can't get much simpler than
If MarketPosition >= 2 AND Close > EntryPrice+10 then Sell ("PT2") 2 contracts this bar at Market;
It's pure trader talk
I've never had an issue with MC giving wrong figures.
In the example from Arsht, the user was continually downloading data from Tradestation.
Who knows, maybe TradeStations data servers were the issue not the Charting/BackTesting area of TradeStation.
Either way, it was still commenting about TradeStation not Multicharts.
Neil - Thank you. I appreciate the clarification. Yes, I'm well aware of TS and MC being different alright. I had just scrutinized TS as a broker, and won't be going that route. I've been using MCDT for almost a year now (with OEC data)... As I understand it, MC's PL is EL, just a little different, improved I believe.
However, I think I had read somewhere here that the language is incapable of performing certain tasks that folks were trying to replicate from NT; that its emphasis on being easy was somehow a limiting factor. I wish I could remember the particulars as it has been several months... Not that I would encounter those situations, but for some that was problematic.
While EL / PL is probably easier to learn than AFL, it seems that AFL is not exactly painfully difficult though. And, if it can accomplish tasks that EL / PL cannot (if wrong, I welcome, and want to be corrected), needs less code, and is actually faster - it merits attention.
A book. That's great. Looks like it's not quite up-to-date with the most recent release, but still probably plenty helpful.
I already have familiarity with MC via MCDT and I have data for it via a current broker relationship (OEC). And while I have just a couple days with AB and no certainty yet as to how I'd get data into it without incurring additional fees, I find it very appealing.
That said, going through many pages on another forum about AFL, it's clear that it's not easy for all or commonsensical. There seems to be a learning curve involved, and if so, that would need to be factor too. It seems that there are quite a few who could not put their thoughts or strategies into action with AFL, and asked for help often. If users of MC's PL are able to get rolling sooner and need less help, or none at all, there something to be said for that...