Hi,
I'm trying to make an indicator that shows the difference between the moving average of the candle opens and the moving average of the candle closes.
I can't seem to figure out how to get the average based on the open price. I know I can do it in the chart but I don't know how to code it.
I've tried this :
var vMAO = sma(nMA, "Open");
but it gives me the same output as
var vMAO = sma(nMA, "Close");
Any help would be greatly appreciated.
Also is there anyway to use the moving average of a product that is not in the chart as part of the indicator.
Cheers
Shane
I'm trying to make an indicator that shows the difference between the moving average of the candle opens and the moving average of the candle closes.
I can't seem to figure out how to get the average based on the open price. I know I can do it in the chart but I don't know how to code it.
I've tried this :
var vMAO = sma(nMA, "Open");
but it gives me the same output as
var vMAO = sma(nMA, "Close");
Any help would be greatly appreciated.
Also is there anyway to use the moving average of a product that is not in the chart as part of the indicator.
Cheers
Shane
Comment