RlyNotUrBroker
New member
Hello. I'm sure this is a basic question but I'm just getting into ThinkScript but I can't figure out for the life of me how to get a horizontal line to plot at the previous day close. what I have is as follows:
def lasttrade = close;
plot test = close;
def aggregation = aggregationPeriod.DAY;
it will plot a line at every close price for the chart timeframe I'm looking at, but I want it to plot only a horizontal line at the previous day close.
Basically I want it to look at only the previous candle and plot a horizontal line across the chart that marks the previous close
I've tried the painting strategy.HORIZONTAL but it gives me a syntax error and I don't know where to go with this anymore. any help is appreciated!
def lasttrade = close;
plot test = close;
def aggregation = aggregationPeriod.DAY;
it will plot a line at every close price for the chart timeframe I'm looking at, but I want it to plot only a horizontal line at the previous day close.
Basically I want it to look at only the previous candle and plot a horizontal line across the chart that marks the previous close
I've tried the painting strategy.HORIZONTAL but it gives me a syntax error and I don't know where to go with this anymore. any help is appreciated!
Last edited by a moderator: