jmythngdmb
New member
I searched this but didn't find anything, I don't really know anything about coding. I would simply like to plot a band above and below my SMA that shows $0.70 above and $0.70 below. In other words I'd have band on my chart that would show the the stock price is 70 cents away from the SMA in either direction. This code below will not work but I think it might help to give an idea of what I am talking about. Any help would be greatly appreciated.
Another way around this would be if I could put a badge on the charge that would always show the price difference from the current price to the 9 period SMA, or any period for that matter.
Another way around this would be if I could put a badge on the charge that would always show the price difference from the current price to the 9 period SMA, or any period for that matter.
Code:
input price = close;
input length = 9;
input displace = 0;
input showBreakoutSignals = no;
plot SMA = Average(price[-displace], length);
plot UpperBand = SMA + (price+0.70);
plot LowerBand = SMA + (price-0.70);
SMA.SetDefaultColor(GetColor(1));
Last edited by a moderator: