• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarRequest.Update

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

    BarRequest.Update

    I'm trying to understand the Update event in a BarRequest and how to subscribe / unsubscribe.

    a) If I call the Request method with the Update event already assigned I get the updates.but

    b) If I call the Request method without the Update event assigned and assign it later then I don't get the updates.

    I'm trying to create an addon where I can turn on and off updates on the fly. Any help would be appreciated.

    #2
    Hello,

    Thank you for the post.

    I would need to put in a question to development if subscribing later is possible while using this event, Once I have a reply on that I will post back to this thread. This may take some time to get an answer for this item, so in the meantime, I would likely suggest to use the approach that works and then control the data from the update void logically. You could do this by simply using a bool condition to toggle if the logic should be enacted or not.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello,

      I just wanted to reply back on this item. While formulating a sample for development I noted that I was able to subscribe and unsubscribe at any given point while using a BarsRequest. Could you try the attached sample and see if you are also able to subscribe and unsubscribe? This is an indicator but uses the addon BarsRequest as you would from an addon. It adds two buttons to the toolbar of a chart which then subscribes to AAPL, please change the instrument in the code if needed.

      If this is simply that something was missed in your test and this works for you, I can close the ticket. Otherwise, if this is not working for you, please let me know and we can continue troubleshooting this.

      I look forward to being of further assistance.
      Attached Files
      JesseNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by derivtrader, Today, 07:19 AM
      0 responses
      2 views
      0 likes
      Last Post derivtrader  
      Started by MarthaClines, Yesterday, 06:20 PM
      1 response
      13 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by danitralla, Today, 01:23 AM
      2 responses
      40 views
      0 likes
      Last Post NinjaTrader_DrewO  
      Started by Longhornmark, Today, 06:52 AM
      0 responses
      2 views
      0 likes
      Last Post Longhornmark  
      Started by Steve L, Yesterday, 10:01 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jim  
      Working...
      X