Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Create Alert from Indicator with No Plot

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

    Create Alert from Indicator with No Plot

    Hi,

    I have a custom indicator which draws an object (e.g. dot) when certain conditions are met. As such, this is not a Plot and I do not have an AddPlot(). I do have a Series<bool> variable to store "true" values when these conditions are met. I notice that under the Alerts Window, I am not able to create an Alert based on this indicator as it does not use AddPlot() to plot anything on the chart.

    I understand that I can use Alert() to hardcode the alert in the script. But if I do this, does this mean that the alert will be permanently on?
    I would like a way to manually turn on or turn off the alert, like how I can do so using a manually created alert. How can I do this?

    Thanks.

    #2
    Hi nightlights, thanks for posting.

    You can either create a plot and set its brush to Brushes.Transaprent or implement a boolean public property to toggle the alert on or off e.g.

    [NinjaScriptProperty]
    [Display(Name="Toggle", Order=1, GroupName="Parameters")]
    public bool Toggle //this will show up in the indicator settings.
    { get; set; }

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    563 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    329 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X