Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trading Studies Eco news

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

    Trading Studies Eco news

    Hello

    How do I read the alert time left from EcoNewsControl.EcoNewsControl from the program itself. It is being rendered properly on screen but all attempts to read it from code are failing. Primary Indicator object is not being cached for some reason and when I access it via ChartControl.Controls array, I do get access to a valid object from which I am able to drill down all the way to a Cell but unable to read its value.

    On the control, it states that it developed by tradingstudies.com. Browsing for that URL is now redirects me to to Ninja homepage. I have attempted reading

    In my last attempt, I added following property. All prior statements that worked are commented because I actually want the Time left value.

    Code:
    public String TimeLeftString
    {
       get { 
         try
         {
     	//return newsList.ToString(); // [B]Works [/B]returns class name
    	//return newsList.Rows.Count.ToString(); // [B]Works[/B]; returns 63
    	//return newsList.Rows[0].Cells.Count.ToString(); // [B]Works [/B]returns 8
    	//return newsList.Rows[0].Cells[7].ToString(); // [B]Works [/B]; returns class name
    	[COLOR="Red"]return newsList.Rows[0].Cells[7].Value.ToString(); // FAILS![/COLOR]
        } 
    	catch(Exception e)
    	{
         // All except the last return statement work
        // Last return statement throws following exception.
        //System.NullReferenceException: Object reference not set to an instance of an object.
        //   at EcoNewsControl.EcoNewsControl.get_TimeLeftString()
    		return e.ToString();
    	}
    }
    }
    Last edited by cdjindia; 01-07-2014, 02:00 AM.

    #2
    We would unfortunately not be intimately familiar with this custom study - best would trying to PM the developer that published it here on the forums. I will also leave this open for community members to comment with their thoughts, potentially one had worked in this area before.

    Comment


      #3
      Bertrand

      Thanks for the kind words.

      I've solved the problem and reworked the Indicator Code so that it can now be used to automatically start/stop a strategy.

      Comment


        #4
        Thanks for the update of the thread, great to hear.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X