Hello,
How could I edit this code to extend the line past the current bar?
Thanks in advance!
input TrendLineLength1 = 21;
def Inertia1 = InertiaAll(HLC3, TrendLineLength1);
def TL_Bull1 = Inertia1 - (HighestAll(AbsValue(Inertia1 - close)) * 0.8);
def TL_Bear1 = Inertia1 + (HighestAll(AbsValue(Inertia1 - close)) * 0.8);
def slope1a = TL_Bull1 > TL_Bull1[1];
def slope1b = TL_Bear1 > TL_Bear1[1];
#Long length
plot TrendLine1a = if slope1a > 0 then TL_Bull1 else TL_Bear1;
TrendLine1a.SetStyle(Curve.FIRM);
TrendLine1a.SetLineWeight(1);
TrendLine1a.AssignValueColor(if slope1a and IsAscending(close, 10) then Color.WHITE else if slope1a then Color.WHITE else if !IsAscending(close, 10) then Color.WHITE else Color.WHITE);
How could I edit this code to extend the line past the current bar?
Thanks in advance!
input TrendLineLength1 = 21;
def Inertia1 = InertiaAll(HLC3, TrendLineLength1);
def TL_Bull1 = Inertia1 - (HighestAll(AbsValue(Inertia1 - close)) * 0.8);
def TL_Bear1 = Inertia1 + (HighestAll(AbsValue(Inertia1 - close)) * 0.8);
def slope1a = TL_Bull1 > TL_Bull1[1];
def slope1b = TL_Bear1 > TL_Bear1[1];
#Long length
plot TrendLine1a = if slope1a > 0 then TL_Bull1 else TL_Bear1;
TrendLine1a.SetStyle(Curve.FIRM);
TrendLine1a.SetLineWeight(1);
TrendLine1a.AssignValueColor(if slope1a and IsAscending(close, 10) then Color.WHITE else if slope1a then Color.WHITE else if !IsAscending(close, 10) then Color.WHITE else Color.WHITE);