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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    572 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X