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

Adding the timeframe onto an Alert email.

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

    Adding the timeframe onto an Alert email.

    Hi

    I have an indicator which sends me an email using the following code:

    Code:
    SendMail(@"[email protected]", @"Alert triggered on " + Instrument.FullName, @"Set order to sell at  " + (Low[0] - (TickSize * 10)) .ToString() + @" with stop loss at " + (High[0] + (ATR1[0])) .ToString());
    I would like to also put in the subject of the email which time frame has been specified in the data series of the chart that is using the indicator.
    Could someone help me with the additional code I would need to achieve that? I looked at TimeSeries but don't think that is correct...?

    Many thanks
    Tim

    #2
    Hello Tim,

    Thanks for your post.

    The exact code needed somewhat depends on the bar type used. For example if using a Heiken-Ashi bar then there would be the sub bar type of tick, minute, etc.

    Here is an example for a base bar type you can test with: Print ("Bars Type: "+BarsPeriod.BarsPeriodType +" "+BarsPeriod.Value); where the value is the bar size.

    The example is based on the information here: https://ninjatrader.com/support/help...barsperiod.htm
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by inanazsocial, Today, 01:15 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by rocketman7, Today, 02:12 AM
    0 responses
    6 views
    0 likes
    Last Post rocketman7  
    Started by dustydbayer, Today, 01:59 AM
    0 responses
    1 view
    0 likes
    Last Post dustydbayer  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    5 responses
    23 views
    0 likes
    Last Post trilliantrader  
    Started by Davidtowleii, Today, 12:15 AM
    0 responses
    3 views
    0 likes
    Last Post Davidtowleii  
    Working...
    X