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 jpapa, Today, 07:22 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by kevinenergy, 02-17-2023, 12:42 PM
        116 responses
        2,757 views
        1 like
        Last Post kevinenergy  
        Started by franatas, 12-04-2023, 03:43 AM
        7 responses
        106 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Jltarrau, Today, 05:57 AM
        3 responses
        8 views
        0 likes
        Last Post Jltarrau  
        Started by f.saeidi, Today, 05:56 AM
        2 responses
        8 views
        0 likes
        Last Post NinjaTrader_Erick  
        Working...
        X