AddText(Text)

AddText procedure writes a label on the graph. The place is automatically detected by CurrentBar variable.

 

This procedure has one parameter:
Text   The text you want write on the graph. The text is written on the graph only if there is an action (Buy, Sell, Cover, Short)

 

Example:

' This is a system
Sub Main()
  For CurrentBar = BeginBar to EndBar
    If GetValue("RSI", CurrentBar) < 20 then
      Buy(CurrentBar)
      AddText("Buy here")
    Else If GetValue("RSI", CurrentBar) > 80 then
      Sell(CurrentBar)
      AddText("Sell here")
    End If
  Next
End Sub