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

Email Alerts - Can the Instrument Name be Included

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

    Email Alerts - Can the Instrument Name be Included

    I have set up email alerts on my strategy that I am running across an instrument list. Is there anyway to include the instrument name that is triggered by the strategy? For instance, if I have an instrument list running in the background with one strategy running on all the instruments. Once the strategy is triggered, it sends me an email alert. However, is there anyway to know what instrument triggered it without having to be at my computer to see? Can ninjatrader include the instrument into the email alert?

    #2
    Hello seahawk13,

    Thanks for your post.

    Yes, you can get the instrument name and more:
    References:



    Examples:

    You might try printing these to see what works for you:

    Print ("Instrument "+Instrument.MasterInstrument.Name);
    Print ("fullname: "+ Instrument.FullName);
    Print ("ID: "+ Instrument.Id);
    Print ("expiry: "+ Instrument.Expiry);
    Print ("Bar type: "+BarsPeriod.Id);
    Print ("Bar period: "+BarsPeriod.Value);
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hey Paul, I am kinda confused on where that information would go into. I have attached a screenshot of the area I am working out of it.

      Comment


        #4
        Hello seahawk13,

        Thanks for your reply.

        I've replied to your e-mail.

        For closure here, the issue is the use of the strategy wizard e-mail. The instrument property values I showed cannot be used because the wizard automatically will add "" to create text strings. The answer provided was to unlock the strategy wizard code and enter the variables without "".
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Stanfillirenfro, Today, 07:23 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        2 responses
        20 views
        0 likes
        Last Post cmtjoancolmenero  
        Started by olisav57, Yesterday, 07:39 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cocoescala, 10-12-2018, 11:02 PM
        7 responses
        944 views
        0 likes
        Last Post Jquiroz1975  
        Started by oviejo, Today, 12:28 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X