Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 17:12:06 +0000



Post From: Tick dots on chart

[2015-06-11 14:33:33]
Rob_2560 - Posts: 20
I need help with a study for plotting where extreme ticks are on the chart. I know I can overly the tick below my chart but what I want is just to plot extreme moves on my chart such as +800, +1,000 ... etc.

I have this coded in thinkorswim but now am looking to code it into Sierra. See attached screenshot from thinkorswim for what I am hoping this to look like. A dot gets plotted when the Tick goes to an extreme level. The more extreme the level the larger the dot.

Any help would be appreciated.


input dotOffset = 1.0;
input HighThreshold = 1000;
input LowThreshold = -1000;

def tickDataLow = low("$TICK");
def tickDataHigh = high("$TICK");
def tickClose = close("$TICK");

def isLow = If((tickDataLow < LowThreshold), 1, 0);
def isHigh = If((tickDataHigh > HighThreshold), 1, 0);

def plotcolor = If(isLow, 6, 5);
plot TickDot = If(isLow and !isHigh, low - dotOffset, If(isHigh and !isLow , high + dotOffset, Double.NaN));
TickDot.SetStyle(Curve.POINTS);
TickDot.AssignValueColor(GetColor(plotcolor));
TickDot.SetLineWeight(3);

AddLabel(isHigh, Concat("High Tick = ", If(isHigh > 0, tickDataHigh, 0)), Color.GREEN);

AddLabel(isLow, Concat("Low Tick = ", If(isLow > 0, tickDataLow, 0)), Color.DOWNTICK);

imageTick.jpg / V - Attached On 2015-06-11 14:29:28 UTC - Size: 387.22 KB - 496 views