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

Print DataSeries Name to String

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

    Print DataSeries Name to String

    I want to use the same indicator on two separate charts, lets say a 5000 volume and a 200 volume. This indicator has alert features that sends me an email. The problem is, I cant tell which chart triggered the alert from my email. How can I print to string the chart name / data series to something like this: "Crossed 20 MA on the 5000 volume chart". I have spent a couple of hours searching but cannot find anything related to how to do this.
    Thanks,

    #2
    Ellis Guy,

    This is possible but would require you modifying the indicator code as well as creating custom strings in the NinjaScript code for the indicator itself.

    The function you are looking for is called SendMail(), please find information below.



    To determine which period chart the indicator is attached to, you use BarsPeriod. Please find more information below.



    Something like this would work :

    Code:
    SendMail("[email protected]", "[email protected]", "Trade Alert", "Crossed 20 MA on "+BarsPeriod.Value+" volume chart.");
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kevinenergy, 02-17-2023, 12:42 PM
    117 responses
    2,766 views
    1 like
    Last Post jculp
    by jculp
     
    Started by Mongo, Today, 11:05 AM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by SightCareAubetter, Today, 12:55 PM
    0 responses
    3 views
    0 likes
    Last Post SightCareAubetter  
    Started by traderqz, Today, 12:06 AM
    8 responses
    16 views
    0 likes
    Last Post traderqz  
    Started by SightCareAubetter, Today, 12:50 PM
    0 responses
    2 views
    0 likes
    Last Post SightCareAubetter  
    Working...
    X