I tried this question on the AmiBroker Yahoo group and got no responses, so I thought I'd try it here. I like the idea, speed, and openness of AmiBroker, but for me the documentation and official support channels are not what I'd hope.
In any case, if no one has the answer but is interested in the same thing, I'll probably hire a freelancer to evaluate it for me, so if you let me know your interest I'll post the fix / answer if and when I get it.
Hello. I've written / aggregated some existing code for position sizing. I'm generally receiving the results I expect, but I have the feeling I've written the code so it runs extremely inefficiently. I'm not a strong coder and don't fully 'get' all of the custom backtest features, so there is a good chance I've not used the right parts of the custom backtester and/or have not ordered things in the best way. With that in mind, I'd appreciate as much specific help as people are willing to
For context, there is no need to give responses simply pointing me to the standard documentation on the custom backtester. I've tried reading the docs multiple times and gathered what info I could from the Internet, but I guess my coding skills are not strong enough to really 'get' much of it. And yes, I've read all the specific posts I could find on using AmiBroker with custom position sizing and "leveraged" what I could from them given my understanding.
Here's what I'm trying to acheive: 1. Tiered position sizing. I want to be able to vary the position size based on the current equity. For example, when equity is $100,000 to $125,000, the size should be a 1% RISK of total equity. I'm defining risk based on my maximum stop loss, not based on the value of the position.
2. I want to display several custom metrics in the trade log. Specifically, I want to show: (a) Initial Risk $; (b) R-Multiple for each trade, and (c) Cumulative R multiple.
3. I want to show several custom metrics in the backtest report. Specifically: (a) Total R; and (b) Average R.
All of the code seems to work, but for a few reasons I think I'm likely getting the results very inefficiently. Also, I may be using outdated/incorrect methods. For example, I read that the PositionSize variable is now outdated but I wasn't clear if the same-named custom backtester method was also outdated, (i.e., I didn't see references to the SetPositionSize option in the context of the custom backtester).
Here's the options I've set and the custom backtester code. Feedback to help me achieve the results more efficiently are appreciated.
I don't know what you expect. It sound like a reproach that no one replied to you (actually out of interest I have searched for your question on their user's forum et voila I have found a reply to your question). Everyone is free to reply or not to reply at any time she/he wants to. In addition official support does not provide free coding. AFAIK their hourly quote is $60. This world is not the world of billions of Mother Theresas. I had to learn how to code myself few years ago including how to code in AFL. So it does not fly to you out of nowhere. You have to start to fly yourself. If you don't wanna fly yourself (because of fear, laziness or other reasons) you need someone who does it for you (at an according quote or for free if there is a kind soul out there). But again if you learn something yourself you make yourself independent from others. Knowledge is power.
The following user says Thank You to badabingbadaboom for this post:
Unfortunately, what I posted was as far as I got. I'm sure AmiBroker is a powerful and fast program. However, I found the support to be lacking (at least for someone at my level of coding expertise, which is limited) so have abandoned it for other products.
As it has already been mentioned here someone had already responded to your post in the official AmiBroker forum back then at same time in 2012. Just looked it up myself using the search function.
Here is the link to it https://groups.yahoo.com/neo/groups/amibroker/conversations/topics/173663
And so far you haven't even responded back yet. Have you even tried that one by touini?
FYI, Amiboker's support channel is email@example.com but not that Yahoo forum which is the official user forum.
Yes, I tried the solution. I've been in touch w/ Touini many times about it and other things.
And yes, I tried the formal AmiBroker support channel... a number of times. The responses were absolutely useless. And frankly, the type of attitude that comes clearly across in your email is the type of attitude I saw many times on the AmiBroker forums (i.e., if you don't know the answer or can't figure it out, you're the problem) and was one of the reasons I have largely abandoned it for products with a more helpful user base and support network.
I don't have a stake in which program I use, I just want to be able to quickly and easily accomplish what I want to do. I'm sure you've made the right choice for you, which is great.
I would like to disagree in that point. I made the experience that you get quick answers in the yahoo forum. But first things first: do your homework and learn how to deal with Amibroker. Amibroker is different and powerful. But do not expect other people to solve your problems in detail. You have to learn and dig in deeply. There is no free lunch. Consider reading the books from Howard B. Bandy if you want to learn the advanced topics.
Just my 2 cents.
Here is the quote from Amibroker's website about what is included in their free support:
Email? What mail? I have never ever sent any mail to you in my whole life! I'm not selling anything and we are not friends so why should I send mails to you?
Attittude? I have just informed you here about the difference of the user forum and their support channel and about what has been responded in the forum! That is called a fact not an attitude.
No helpful userbase? That is what I call a slap in the face of i.e.touini. Wow! That's what I call an unbelievably rude attitude! what a slap in the face of all users who are giving solutions there every day free of charge! Some people seem to live on a neverland ranch expecting others to sit outside just to spend time with them 24 hours a day under a slave rate contract. Because of people like you who expect to be spoon feeded on every step and if they are not turning into Prince "Charming" I am really thinking about to abandon my own efforts there which are taking me my free time.
Exactly! I have had to learn many things in my life on my own and still learning. Life is a never ending learning process. Yes, I've got help here and there also but without getting spoon feeded. The final step is up to me. And I am giving back knowledge myself. It is one of the most normal things in the world that a certain price has to be paid most of the time. But just taking, taking, taking is not gonna work anywhere.
Last edited by occasionallurker; April 9th, 2014 at 02:51 PM.
The following user says Thank You to occasionallurker for this post: