itsthefriz
New member
Hey I'm working on a simple Thinkscript that is able to pull a moving average from a different chart. Like...say I want to see a 7 period moving average of the spoos up/down difference overlaid on top of the SPX.
Unfortunately I'm not much of a coder, and most of my experience with coding is with VBA...and the VBA resources and examples are much better. If any of you can take a quick look at this I'd appreciate it. I believe the code is wrong because the moving average seems to change based on what the main chart is.
declare lower;
input symbol = {default "$ADSPD"};
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 7;
input averageType = AverageType.SIMPLE;
plot MovAvg = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length);
Unfortunately I'm not much of a coder, and most of my experience with coding is with VBA...and the VBA resources and examples are much better. If any of you can take a quick look at this I'd appreciate it. I believe the code is wrong because the moving average seems to change based on what the main chart is.
declare lower;
input symbol = {default "$ADSPD"};
input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.DAY;
input length = 7;
input averageType = AverageType.SIMPLE;
plot MovAvg = MovingAverage(averageType, Fundamental(price, period = aggregationPeriod), length);