1 Reply Latest reply on Dec 8, 2012 12:17 AM by Ahmad Fattahi

    Setting the time range on an ad-hoc trend when added - C# add-in


      Hey all,


      I've been making an add-in that sets the time range of all the symbols in a display automatically. My add-in works fine for adding new trends or opening old ones, but it doesn't work for ad-hoc trends.


      The code I've been using is as follows:

              private void ActiveDisplay_AfterSymbolAdded(Symbol aSymbol)
                  aSymbol.SetTimeRange(savedStartTime, savedEndTime);



      This event fires when an ad-hoc trend is added but, when it completes, the trend shows the default time range set by PB.


      Anyone have any ideas?