Plot Dots?

gravityflyer

Member
Joined
Feb 19, 2022
Posts
14
Likes
5
Hi all,

Is there a way to plot dots in the lower study? In particular, is there an existing study I can reference as an example to reverse engineer?

My current script I'm working on is using a histogram if a condition is satisfied, however, I would like to add another condition but rather than have two separate studies I figured I could simply have two or three rows of dots. I've attached a rough example from ThinkOrSwim.

Thanks!
 

Attachments

  • Screen Shot 2022-04-17 at 7.33.49 PM.png
    Screen Shot 2022-04-17 at 7.33.49 PM.png
    77.5 KB · Views: 11

q0paz

Active member
Joined
Aug 19, 2020
Posts
27
Likes
7
SettingGroup colors = new SettingGroup(get("TAB_DISPLAY"));
colors.addRow(new PathDescriptor(" ** ", " ** ", Color.gray, Enums.PointType.DASH , Enums.Size.VERY_SMALL));

does this help ?
 

orishaspollo

Active member
Joined
Nov 24, 2021
Posts
37
Likes
3
You mean like a Squeeze indicator on the bottom?
Or a BULL(green) or BEAR (red) on the bottom like MetaStock does it?
 

Spin

Well-known member
Joined
May 22, 2019
Posts
477
Likes
191
Try this snippet:

Code:
if (Something > SomethingElse)
    {
      
        MarkerInfo marker = getSettings().getMarker(MARKER19);
        if (marker.isEnabled())
            addFigure(CHECK_PLOT, new Marker(d4, Enums.Position.CENTER, marker));
      
    }
  
    if (Something < SomethingElse)
    {
      
        MarkerInfo marker = getSettings().getMarker(MARKER20);
        if (marker.isEnabled())
            addFigure(CHECK_PLOT, new Marker(d5, Enums.Position.TOP, marker));
      
    }


You would obviously first need to define the MARKER19 and 20 in 'initialize' and also add the secondary plot there as well.
The d4 & d5 are numbers you define, and they will establish the level at which the dots are drawn in the secondary plot (e.g.: at 30, 60 and 90 in a plot that goes from 0 to 100)
:)
 
Top