DMacTrades
New member
Hi all. I am looking for help in creating a custom code that plots a horizontal line and creates a bubble for yesterday's high of day on today's intraday chart (the bubble would indicate the HOD from yesterday).
I found this code from a thread talking about the monthly and changed it so that it prints a label on the daily indicating yesterday's high and today's high, but it only works on the daily and I can't figure out how to have it plot a line on the intraday. Thanks very much in advance.
def DAY = AggregationPeriod.DAY;
def dayHigh = high (period = DAY);
AddLabel(yes, "PDH: " + dayHigh +", PDH1: " + dayhigh[1], Color.White);
def PDH = high (period = DAY);
def PDH1 = high (period = DAY)[1];
# PDH[1] is NOT equal to PDH
I found this code from a thread talking about the monthly and changed it so that it prints a label on the daily indicating yesterday's high and today's high, but it only works on the daily and I can't figure out how to have it plot a line on the intraday. Thanks very much in advance.
def DAY = AggregationPeriod.DAY;
def dayHigh = high (period = DAY);
AddLabel(yes, "PDH: " + dayHigh +", PDH1: " + dayhigh[1], Color.White);
def PDH = high (period = DAY);
def PDH1 = high (period = DAY)[1];
# PDH[1] is NOT equal to PDH