you can do that by, cutting your code and pasting inside code tags. The people that run this site prefer that code is posted within tags. I haven't looked at your code yet, but did find a couple of examples that may help. LineExtension.SetDefaultColor(Color.CYAN) Plot LineExtension = if lineX > 0 then lineX else Double.NaN Plot S1 = if bar >= HighestAll(PLBarOrigin)
Plot R1 = if bar >= HighestAll(PHBarOrigin) Any assistance is greatly appreciated.ĭef lastValue = if IsNaN(c) then c else lastValue ĭef minBar = Min(HighestAll(hhBar), HighestAll(llBar)) ĭef firstPoint = if minBar = HighestAll(hhBar)ĭef run = if bar = minBar then 1 else run + 1 ĭef rise = if bar = HighestAll(secBar) then secPoint - firstPoint else Double.NaN ĭef slopeX = if !IsNaN(slope) then slope else slopeX ĭef lineX = if !IsNaN(slope) then secPoint else lineX + slopeX I'm trying to get the top trend line for the code below.