Announcement

Collapse
No announcement yet.

Alert Displayed on Bar (+2) Only

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

  • Alert Displayed on Bar (+2) Only

    What code is needed to cause an alert (Shape, etc.) to display on bar (+2) only (chart margin area), with no historical alerts displayed?

  • #2
    Lancer
    Here is an example
    drawShapeRelative(2, close(), Shape.LEFTARROW, "", Color.red, Shape.LEFT,1)
    The last number in bold will be your unique tag. It does not need to be a number just a unique tag. Here is another example using drawText
    drawTextRelative(2,getMostRecentTrade(),"t",Color. blue,null,Text.VCENTER|Text.BOLD,"Wingdings 3",8,"Arrow");
    Alex
    Last edited by ACM; 07-31-2003, 03:07 PM.

    Comment


    • #3
      Is it the unique tag value that causes historical alerts not to display? Why "1"? How would a unique tag of "2" change things?

      What about the case of a SetBgColor alert. How is a unique tag applied so that BgColor alerts only display on bar (+2)?

      Comment


      • #4
        Lancer
        In part I have already replied by adding to my prior answer.
        All it needs to be is a tag that is unique to that shape, text etc. The tag can be anything you wish. I used a number 1 simply as an example. In the other example I used "Arrow".
        If you then had some other shape you wanted drawn somewhere else and you wanted only one of that also then you would give it the next unique tag ie 2 and so on and so forth.
        If instead you wanted to display also the historical occurrences then you would give it no tag and every time the signal is triggered the shape will be plotted.
        As to background color I don't believe you can do that, but I am not positive so you may want to check
        Alex

        Comment

        Working...
        X