declare upper;
input price = HL2;
input HMA_Length = 30;
input lookback = 2;
plot HMA = HullMovingAvg(price = price, length = HMA_Length);
def delta = HMA[1] - HMA[lookback + 1];
def delta_per_bar = delta / lookback;
def next_bar = HMA[1] + delta_per_bar;
def concavity = if HMA > next_bar then 1 else -1;
plot turning_point = if concavity[1] != concavity then HMA else double.nan;
HMA.AssignValueColor(color = if concavity[1] == -1 then
if HMA > HMA[1] then color.dark_orange else color.red else
if HMA < HMA[1] then color.dark_green else color.green);
HMA.SetLineWeight(1);
turning_point.SetLineWeight(4);
turning_point.SetPaintingStrategy(paintingStrategy.Horizontal);
turning_point.SetDefaultColor(color.white);
https%3A//i.imgur.com/4WqZonz.jpg[/img]']
Hi, I wanted to plot 5 dashes whenever the turning pt conditions are met. I have changed the plot to "horizontal" but can only get 1 dash. Can some one help to correct my error. Thanks
input price = HL2;
input HMA_Length = 30;
input lookback = 2;
plot HMA = HullMovingAvg(price = price, length = HMA_Length);
def delta = HMA[1] - HMA[lookback + 1];
def delta_per_bar = delta / lookback;
def next_bar = HMA[1] + delta_per_bar;
def concavity = if HMA > next_bar then 1 else -1;
plot turning_point = if concavity[1] != concavity then HMA else double.nan;
HMA.AssignValueColor(color = if concavity[1] == -1 then
if HMA > HMA[1] then color.dark_orange else color.red else
if HMA < HMA[1] then color.dark_green else color.green);
HMA.SetLineWeight(1);
turning_point.SetLineWeight(4);
turning_point.SetPaintingStrategy(paintingStrategy.Horizontal);
turning_point.SetDefaultColor(color.white);
https%3A//i.imgur.com/4WqZonz.jpg[/img]']
Hi, I wanted to plot 5 dashes whenever the turning pt conditions are met. I have changed the plot to "horizontal" but can only get 1 dash. Can some one help to correct my error. Thanks