Announcement

Collapse
No announcement yet.

setPlotType(PLOTTYPE_DOT)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • setPlotType(PLOTTYPE_DOT)

    You have a plot code called setPlotType(PLOTTYPE_DOT) which allows you to put a dot on the price chart at any specified value. This code is the same thing that TOS has which is called PaintingStrategy.Points. However, TOS also has a code called PaintingStrategy.VALUES_BELOW where instead of a dot it plots the actual value of an indicator below or above the price bars instead of a dot. Do you have anything comparable so that numerical values can be plotted under or above the price bars based on the value it has in the script?
    Last edited by rcbenjamin; 02-04-2020, 10:33 AM.

  • #2

    Hello rcbenjamin,
    If you want to plot the value of a variable above or below a price bar, you can use drawTextRelative to put something on a chart that stays with that bar as new bars stream in, or you can use drawTextAbsolute to put a variable on a chart that doesn’t move. In the event of drawTextRelative, I assume that you want the value to never change, in which case you give it a unique name such as "Exit"+rawtime(0) so that it never changes. I have some charts where I want to see the value of an indicator that’s not plotted, so I use drawTextAbsolute with a TagID that’s not unique so that it just keeps changing as the variable changes. I’m going to upload a word document that has the location flags and other info to help you figure it out. I hope that this helps!

    drawTextRelative(0, AboveBar1, YourVariableName, Color.red, null, Text.PRESET|Text.CENTER, "Arial", 10, "Exit"+rawtime(0));

    drawTextAbsolute(0, TopRow1, YourVariableName1, Color.RGB(0,192,0), null, Text.PRESET|Text.CENTER, "Courier New", 12, "Var1");
    drawTextAbsolute(-15, TopRow1, YourVariableName2, Color.RGB(192,0,0), null, Text.PRESET|Text.CENTER, "Courier New", 12, "Var2");
    Attached Files

    Comment


    • #3
      Thank you. It worked absolutely marvelous and gave me more than what I was looking for which was a bonus. Thank you very very much!!
      Last edited by rcbenjamin; 02-07-2020, 09:02 AM.

      Comment

      Working...
      X