Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can Alerts work with Yahoo EOD?

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

    Can Alerts work with Yahoo EOD?

    I have the following piece of code that I am using pre/post market hours for equities

    NewLong is being set correctly and plotted correctly but the Alert is not being generated? Any ideas?


    if ((DateTime.Now.AddDays(-1).Date ==Time[0].Date) && (ToTime(DateTime.Now) <= ToTime(9, 30, 00)))// Yesterdays date Premarket(before 9,30,00)
    {
    index=0;
    if (((Trend[(index+1)]==0) && (Trend[index]==1) ) || ((Trend[(index+1)]==-1) && (Trend[index]==1) ))
    {
    NewLong.Set(1);
    Alert("GoingLong", NinjaTrader.Cbi.Priority.High, "New Long Position Initiated today...", "Connected.wav", 300, Color.Green, Color.White);
    }
    else
    {
    NewLong.Set(0);
    }

    #2
    Hello Meftrader,

    This might not work properly if you are using the Yahoo feed. This is because they only supply a delayed end of day service. You will not get consistent intraday charts with the yahoo connection and this is what's needed for basing conditions off time.

    From looking at your description though you are getting the condition to trigger (NewLong is set) but not seeing the alert element. Make sure you are monitoring for potential alerts with the alert window by clicking File > New > Alert.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Yes I am getting NewLong set but not seeing the Alert element . I have the Alerts window up (File > New > Alerts) but still no joy?

      Comment


        #4
        The yahoo connection isn't likely to contribute here since you're not actually referencing time stamps. Alerts only work on real time conditions. They are designed to signify when conditions are true NOW. Since you're testing for conditions yesterday (always going to be historical) this will never produce anything.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        61 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        40 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X