Hello,
My goal is to draw the daily moving averages on my 1m chart from QQQ, even though I only trade SPY. I already do this with SPY daily moving averages and impose them over my 1m candles. Big fan of automatically drawing support/resistance lines as much as possible.
I can draw the SPY daily moving averages on my charts with the following:
I want to do this exact same thing, but specify it's for QQQ and these functions don't seem to accept a ticker as input.
Any ideas appreciated.
My goal is to draw the daily moving averages on my 1m chart from QQQ, even though I only trade SPY. I already do this with SPY daily moving averages and impose them over my 1m candles. Big fan of automatically drawing support/resistance lines as much as possible.
I can draw the SPY daily moving averages on my charts with the following:
Code:
plot SMA5 = SimpleMovingAvg(close (period = AggregationPeriod.Day), 5);
plot SMA10 = SimpleMovingAvg(close (period = AggregationPeriod.Day), 10);
plot SMA21= SimpleMovingAvg(close (period = AggregationPeriod.Day), 21);
plot SMA50= SimpleMovingAvg(close (period = AggregationPeriod.Day), 50);
plot SMA100= SimpleMovingAvg(close (period = AggregationPeriod.Day), 100);
plot SMA200 = SimpleMovingAvg(close (period = AggregationPeriod.Day), 200);
plot SMA250 = SimpleMovingAvg(close (period = AggregationPeriod.Day), 250);
SMA5.SetDefaultColor(Color.LIGHT_GRAY);
SMA10.SetDefaultColor(Color.VIOLET);
SMA21.SetDefaultColor(Color.WHITE);
SMA50.SetDefaultColor(Color.YELLOW);
SMA100.SetDefaultColor(Color.CYAN);
SMA200.SetDefaultColor(Color.DARK_ORANGE);
SMA250.SetDefaultColor(Color.DARK_RED);
I want to do this exact same thing, but specify it's for QQQ and these functions don't seem to accept a ticker as input.
Any ideas appreciated.