jbennink83
New member
Hello, my dad uses a formula he came up with to watch his stocks. He has to manually do this every day. I have created a study that plots what he does however it tracks every candle and he just wants the Previous days closing candle high and low. At first i put used
# Previous Day Closing Price (PCL)
input aggregationPeriod = AggregationPeriod.DAY;
def close = close(period = aggregationPeriod)[1];
plot previous_close = close;
I pasted this twice and modified to show the high and close but that was not what he wanted. How can I get the high and low for the last candle of the previous day.
This is what i currently have at the moment:
# Previous Day Closing Price (PCL)
input aggregationPeriod = AggregationPeriod.DAY;
def close = close(period = aggregationPeriod)[1];
# Previous Day Closing Price (PCL)
input aggregationPeriod2 = AggregationPeriod.DAY;
def high = high (period = aggregationPeriod)[1];
def blue = close;
def green = ((high - close) * .8) + blue;
def yellow = ((green - blue) * .2) + blue;
def red = ((green - yellow) * .8) + blue;
plot theline = blue;
plot theline1 = green;
plot theline2 = yellow;
plot theline3 = red;
# Previous Day Closing Price (PCL)
input aggregationPeriod = AggregationPeriod.DAY;
def close = close(period = aggregationPeriod)[1];
plot previous_close = close;
I pasted this twice and modified to show the high and close but that was not what he wanted. How can I get the high and low for the last candle of the previous day.
This is what i currently have at the moment:
# Previous Day Closing Price (PCL)
input aggregationPeriod = AggregationPeriod.DAY;
def close = close(period = aggregationPeriod)[1];
# Previous Day Closing Price (PCL)
input aggregationPeriod2 = AggregationPeriod.DAY;
def high = high (period = aggregationPeriod)[1];
def blue = close;
def green = ((high - close) * .8) + blue;
def yellow = ((green - blue) * .2) + blue;
def red = ((green - yellow) * .8) + blue;
plot theline = blue;
plot theline1 = green;
plot theline2 = yellow;
plot theline3 = red;