![Tradestation Tradestation](http://traders.com/Documentation/FEEDbk_docs/2019/05/images/TT-Tradestation.gif)
I'm trying to build a class to create Aroon series. But it seems I don't understand the steps well. I'm not sure about for what purpose I have to use the period parameter.
Dec 05, 2012 No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given or in any manner endorsed by TradeStation or any TradeStation affiliate and the information made available on this Web site is not an offer.
Here is my first attempt:
Is there anyone else tried to do that before?
Here is the csv file I use:
But the result sets for Aroon up and down don't match with the results of aroon function in TTR package for R.
Screenshot of R result:
Thanks in advance,
anilca
anilcaanilca
3 Answers
@anilca,for full Disclosure, I learned alot of things to answer your question(i knew nothing in the Finetec...). Thank you! it was an interesting experience!
There are several problems in your implementation:
- In the statements:
i - highestHighIndex
and
i - lowestLowIndex
the variable 'i' is less or equal to highestHighIndex, lowestLowIndexso statements:
this.Period - (i - highestHighIndex)
and
this.Period - (i - lowestLowIndex)
will returns the wrong values (most of the time...)
- Aroon up and down both of them are percentage, therefore 'int' is a wrong data structure.
- Because all variables in:
(this.Period - (i - highestHighIndex)) / this.Period)
and
((this.Period - (i - lowestLowIndex)) / this.Period)
are integers you won't recieve the right value.
- one more thing the numbers in your excel are sorted from the newest to the oldest.(it effects on the R package)
I've implemented the algorithm based on your code(and your data order...)
Use this test method for debugging:
Old FoxOld Fox
Just Add implementation of method HighestBarNum and LowestBarnum from your code
JohnJohn
Calculation Class:
Calling code:
Side note:One problem I had was comparing my data to TD Ameritrades Aroon, until i figured out their period is really period-1, so if you're comparing to TD keep that in mind.
spatmacspatmac
Not the answer you're looking for? Browse other questions tagged c#rindicatortradingalgorithmic-trading or ask your own question.
-->Returns the largest integer less than or equal to the specified numeric expression.
Syntax
Arguments
numeric_expression
Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
Return Types
Returns the same type as numeric_expression.
Examples
The following example shows positive numeric, negative numeric, and currency values with the
FLOOR
function.The result is the integer part of the calculated value in the same data type as numeric_expression.
Examples: Azure SQL Data Warehouse and Parallel Data Warehouse
The following example shows positive numeric, negative numeric, and values with the
FLOOR
function.The result is the integer part of the calculated value in the same data type as numeric_expression.