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 CarlTrading, Yesterday, 11:51 AM
        0 responses
        16 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, Yesterday, 11:48 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-25-2026, 09:53 PM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 03-25-2026, 09:51 PM
        0 responses
        13 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 03-23-2026, 11:13 AM
        0 responses
        20 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X