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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X