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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        52 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        24 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        24 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X