I would like to simply display the value of a moving average from the current candle. Here is my code:
xSMA200 = sma(200);
var nSMA200 = (xSMA200.getValue(0));
drawTextRelative(-15, BottomRow2, nSMA200, Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 10, 200);
This results in "Parameter Number 3 is invalid".
I get the same error if I use: xSMA200.getValue(0) as the third parameter.
If I try: xSMA200.getValue() then [object Series] is displayed on the chart.
It has to be simple solution, but I can not figure it out.
Thanks for your assistance.
Phil
xSMA200 = sma(200);
var nSMA200 = (xSMA200.getValue(0));
drawTextRelative(-15, BottomRow2, nSMA200, Color.black, null, Text.PRESET | Text.BOLD | Text.ONTOP, "Arial", 10, 200);
This results in "Parameter Number 3 is invalid".
I get the same error if I use: xSMA200.getValue(0) as the third parameter.
If I try: xSMA200.getValue() then [object Series] is displayed on the chart.
It has to be simple solution, but I can not figure it out.
Thanks for your assistance.
Phil
Comment