Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 14:43:25 +0000



[User Discussion] - Tick dots on chart

View Count: 2486

[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
[2015-06-22 03:57:07]
Rob_2560 - Posts: 20
Anyone have anything similar to this in terms of plotting another indicator over a price chart?

What I need is for when the tick is > 1,000 or 800 it would plot a dot on my chart offset from the bar. Any help would be appreciated. Thanks
[2015-06-23 06:39:05]
Bedhog - Posts: 179
Create a chart with TICK-NYSE
Make a note of the Chart Number (Press F5, # in the title bar) e.g. #10
Add Study: Color Bar Based on Alert Condition
Settings and Inputs Tab: Short Name = TickGT1000 (this is just a label for you)
Subgraphs Tab: Choose a Color; Draw Style=Point on High; Width/Size=11 (so you can see it quickly)
Alerts Tab: Alert Condition= '=c>1000' (without the ' )
Make a note of the ID e.g. ID:1

On your symbol chart (ES, YM, NQ)
Add Study: Study/Price Overlay
Settings and Inputs: Study to Overlay; #10; TickGT1000 (ID:1)

Done.

In my images, the setting was used to print a green dot if the TICK-NYSE close was greater than 600. If you want the high of the bar instead of the close use '=h>1000'
Date Time Of Last Edit: 2015-06-23 06:40:32
imageTICK-NYSE [M] 1 Min #10 2015-06-23 01_33_54.922.png / V - Attached On 2015-06-23 06:35:21 UTC - Size: 90.66 KB - 567 views
imageNQU5 1 Min #12 2015-06-23 01_33_58.782.png / V - Attached On 2015-06-23 06:35:33 UTC - Size: 78.81 KB - 504 views
imageCapture.PNG / V - Attached On 2015-06-23 06:37:17 UTC - Size: 14.37 KB - 523 views
imageCapture.PNG / V - Attached On 2015-06-23 06:37:58 UTC - Size: 6.56 KB - 474 views
imageCapture.PNG / V - Attached On 2015-06-23 06:38:50 UTC - Size: 25.82 KB - 446 views
[2015-06-25 03:10:38]
Rob_2560 - Posts: 20
This is so great!

Thank you so much bedhog!
[2017-01-21 17:15:30]
User188637 - Posts: 2
This was very helpful - THANKS!
[2020-11-16 03:27:47]
User115740 - Posts: 12
Did this stop working? I tried putting it in today into a few different locations and can't seem to get it going.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account