# # TD Ameritrade IP Company, Inc. (c) 2011-2020 #LBR ThreeTen Oscillator declare lower; input price = close; input calculationMode = {default Normal, Alternate}; plot FastLine; switch (calculationMode) { case Normal: FastLine = Average(price, 3) - Average(price, 10); case Alternate: FastLine = Average(price - Average(price[3], 3), 2); } plot SlowLine = Average(FastLine, 16); plot Hist = FastLine; plot ZeroLine = 0; FastLine.SetDefaultColor(GetColor(1)); SlowLine.SetDefaultColor(GetColor(8)); Hist.DefineColor("Positive", Color.UPTICK); Hist.DefineColor("Negative", Color.DOWNTICK); Hist.AssignValueColor(if Hist >= 0 then Hist.color("Positive") else Hist.color("Negative")); Hist.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); Hist.HideTitle(); ZeroLine.SetDefaultColor(GetColor(7)); #End # LBR Three Ten Signal Arrows # Displays signals when the FastLine crosses the SlowLine. # Configure your preferences to display CrossUp/CrossDn signals input showCrossUp = yes; input showCrossDn = no; input price = close; input calculationMode = {default Normal, Alternate}; def FastLine; switch (calculationMode) { case Normal: FastLine = Average(price, 2) - Average(price, 9); case Alternate: FastLine = Average(price - Average(price[3], 3), 2); } def SlowLine = Average(FastLine, 16); plot crossUp = if showCrossUp and FastLine crosses above SlowLine then 0.995 * close else Double.NaN; crossUp.SetpaintingStrategy(PaintingStrategy.ARROW_UP); crossUp.SetDefaultColor(Color.YELLOW); crossUp.SetLineWeight(4); plot crossDn = if showCrossDn and FastLine crosses below SlowLine then 1.005 * close else Double.NaN; crossDn.SetpaintingStrategy(PaintingStrategy.ARROW_DOWN); crossDn.SetDefaultColor(Color.CYAN); crossDn.SetLineWeight(4); # End LBR Three Ten Signal Arrows