Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by dcriador, Today, 12:06 PM
    0 responses
    4 views
    0 likes
    Last Post dcriador  
    Started by dcriador, Today, 12:04 PM
    0 responses
    4 views
    0 likes
    Last Post dcriador  
    Started by cutzpr, Today, 08:54 AM
    0 responses
    8 views
    0 likes
    Last Post cutzpr
    by cutzpr
     
    Started by benmarkal, Today, 08:44 AM
    0 responses
    15 views
    0 likes
    Last Post benmarkal  
    Started by Tin34, Today, 03:30 AM
    2 responses
    26 views
    0 likes
    Last Post Tin34
    by Tin34
     
    Working...
    X