Announcement

Collapse
No announcement yet.

Labels

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

  • Labels

    Hi Guys,

    Do you know how to add a label on the left top corner of the chart to this part of the formula???
    For example if the computer shows me signal to sell, I would like to
    have additional label on top of the screen telling me "S" (not on the chart itself) something like drawLabel...

    Tnx Peter

    if (nSignal < 0 && Strategy.isLong() == true) {
    Strategy.doShort("ReversSHORT", Strategy.CLOSE,Strategy.THISBAR);
    drawTextRelative(3, close(), "S", Color.black, Color.white, Text.FRAME | Text.LEFT | Text.BOLD, null, 20);
    Alert.playSound("C:\Program Files\eSignal\Sounds\SNZD.wav");

  • #2
    Peter
    AFAIK the only thing that can do something outside of the chart is the Triggered Alert List through a pop-up window.
    Alert.addToList(getSymbol()+" "+getInterval(),"S",Color.black,Color.red);
    Alex

    Comment


    • #3
      Peter,

      I believe this will work (edit - still on the chart though - sorry)

      PHP Code:
      drawTextPixel(1010, ("Your Note Here"),  Color.rednullText.RELATIVETOLEFT Text.RELATIVETOTOP|Text.FRAME"Comic Sans MS"18,"FNF"); 
      here is the format for the different fields of this drawing function

      PHP Code:
      drawTextPixel(xBaryValueText, [FGColor], [BGColor], [Flags], [FontName], [FontSize], [TagName], [cx], [cy])

      This function is used to draw text on the chart at precise pixel locationsIt is used in conjunction with the getTextHeight() and getTextWidth() functions


      ·    xBar:        Relative position where text should appear.
      ·    yValue:        y-axis value where text should appear
      ·    Text
      :        The text that should be displayed
      ·    FGColor
      :        Optional. If not providedpass nullForeground color of the text.
      ·    BGColor:        Optional. if not providedpass nullBackground color of the text
      ·    Flags
      :        Text Flags (these can be ORd together). Pass null if not using flags.
      ·    FontName:        Optional. If not providedpass nullOtherwisepass a font name (e.g"Courier" or "Arial").
      ·    FontSize:        Optional. If not providedpass nullOtherwisepass the font size to use (e.g., 11 or 15 or 8etc.)
      ·    TagName:        A unique identifier for this text object
      ·    cx:            OptionalPixel spacing control.
      ·    cy:            OptionalPixel spacing control

      Comment

      Working...
      X