I’m looking to plot a curve (recursion) starting at a specific date.
How do I plot something like this: y = y[1] * 1.005
Thank you, Randy.
How do I plot something like this: y = y[1] * 1.005
Thank you, Randy.
Code:
input startDate = 20240305;
input price = high;
def date = getyyyymmdd();
def x = if startDate == date then BarNumber() else x[1];
def y = if startDate == date then price else y[1];
# Plot a line starting at startDate.
def slope = 2;
plot line = if x != 0 then y + (BarNumber()- x) * slope else double.nan;
# How do I plot a curve (recursion) starting at startDate?
# y = y[1] * 1.005