public int dp;
protected override void OnStartUp()
{
// finds the number of decinmal places in TickSize of product
double d = TickSize - (int)TickSize;
string dstr = d.ToString();
int dp = 0;
if (dstr.IndexOf(".") > 0)
dp = dstr.Length - 2;
else
dp = 0;
}
this code sets dp to the number of decimal places of the TickSize. For FGBL for example TickSize is 0.01 and the value for dp is set to 2.
The problem I am having is some where after OnStartUp the value for dp is being changed to 0. I have stepped tho the code and after it is set at a value of 2 and before the first call to OnBarUpdate it is being changed to 0 ?? Im very confused , any one know why?
*********Found the problem**********

Comment