So I started toying with strategies again and while I wasn't able to actually turn a profit using the preset Aroon strategy, I did see some positive results when I applied it to intervals of a few days.
It seemed to do a very good job of detecting entry and exit points (in backtesting); I think that the only reason it wasn't profitable was because of the binary trade execution (i.e. sell 100% once signal is determined and vice versa). I'd like to use the code as a starting point and try to add a basic algorithm to make incremental buys and sells rather than all or nothing. I'm pretty sure that by just adding a set of a few simplistic rules you could turn the algo profitable.
The one thing that I'm a little confused on is the MathUtil.Aroon method. First, in the code I see three parameters: high, low, 22 - what is the 22 for? Also I'm not sure exactly how the overarching code uses the call to this method to make trades. From the code, it seems like you're just getting the aroon.up and aroon.down, finding the difference and then calling a buy or sell method depending on whether the result is positive or negative.
I have to imagine that's pretty close to what's happening, but I know I'm missing something. For instance, if that was the case then a trade would be initiated at every interval except for the case where aroon.up = aroon.down, which I would think would be fairly uncommon. But the strategy is obviously not making trades at every interval so I know that there has to be more to it than that. Maybe you could help point me in the right direction? Thanks!
Hi
You're correct, that the aroon strategy does not work very well on short periods. I implemented it as a first draft to test my aroon code in the MathUtil class. I think if you combine it with a volume based oscilator like the MFI (that I will hopefully implement tomorrow - depending on how my time schedule and the work on some other features work out), it could work very well!
To answer your questions:
The parameters for AROON are - high (an array of the high-elements of the last candles), low (an array of the low-elements of the last candles, 22 is the period (on how many candles the AROON should look at).
You are absolutely correct, that in this implementation, the aroon strategy would be making a trade at every interval it is even calling the buy/sell methods on the portfolio, but the portfolio will not execute the buy/sell order if you don't have the needed funds (e.g. if you already bought LTC and don't have any USD left). So it will always execute the orders on the first change in trends. If you want to read up more on this technical indicator, you can do that here:
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:aroon.
I hope that I could give you the right pointers, so that you can continue on your investigation