0

Hi I'm using VC++.net 2.0 an creating a few technical indicators for grad school. I am having a problem creating the aroon indicator and I would appreciate some help. Here is a description of what the Aroon Indicator is :

```
Aroon(up) = ((total_num_of_periods - num_of_periods_since_highest_close) / total_num_of_periods) x 100
Aroon(down) = ((total_num_of_periods - num_of_periods_since_lowest_close) / total_num_of_periods)) x 100
```

I would really appreciate any help. Thanks!

```
Tick ^m_Tick;
SortedList ^m_TickList;
double Max = -100000;
double Min = 100000;
int aroonNumPeriodsSinceHH = 0;
int aroonNumPeriodsSinceLL = 0;
int HighestHigh;
int LowestLow;
m_AroonU = 0;
m_AroonD = 0;
m_AroonO = m_AroonU - m_AroonD;
while(1)
{
//Add the tick object to the SortedList.
m_TickList->Add( m_Tick->Price, safe_cast<System::Object^>(0) );
if (m_TickList->Count > 15 )
{
m_TickList->Remove(m_TickList->Count - 1);
}
if ( m_TickList->Count.CompareTo > 15)
{
for( int Z = 0; Z < m_TickList->Count - 1 ; Z++)
{
if (m_TickList->Values[Z] > HighestHigh)
{
HighestHigh = m_TickList->
aroonNumPeriodsSinceHH = Z + 1;
}
if( m_TickList->Count[Z] < LowestLow)
{
LowestLow = m_TickList->Count[Z];
aroonNumPeriodsSinceLL = Z + 1;
}
m_AroonU = (((m_TickList->Count - aroonNumPeriodsSinceHH) / m_TickList->Count[]) * 100);
m_AroonD = (((m_TickList->Count - aroonNumPeriodsSinceLL) / m_TickList->Count[]) * 100);
}
}
}
}
```

*Edited 3 Years Ago by mike_2000_17*: Fixed formatting