Announcement

Collapse
No announcement yet.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    72 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    152 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X