I have a very simple problem. All I want is to get the current numerical value of an indicator (such as SMA) - at its current position in time - and store it in a double variable.

For example (I know this does not work):

private SimpleMovingAverage sma;

double dCurSMA;

dCurSMA = (double)sma;

Thank you for your help,