declare lower;
input priceAtDate = 20220520;
plot showPrice = if GetYYYYMMDD() == priceAtDate then close else Double.NaN;
showPrice.SetPaintingStrategy(paintingStrategy = PaintingStrategy.ARROW_UP);
AddLabel(visible = Yes, text = "showPrice: " + showPrice, COLOR.YELLOW);
Need help how to store the closing price of 20220520 for reuse? I know the problem is due to else statement that's why showPrice always return N/A unless 20220520 is the last bar.
input priceAtDate = 20220520;
plot showPrice = if GetYYYYMMDD() == priceAtDate then close else Double.NaN;
showPrice.SetPaintingStrategy(paintingStrategy = PaintingStrategy.ARROW_UP);
AddLabel(visible = Yes, text = "showPrice: " + showPrice, COLOR.YELLOW);
Need help how to store the closing price of 20220520 for reuse? I know the problem is due to else statement that's why showPrice always return N/A unless 20220520 is the last bar.