Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 warreng86, 11-10-2020, 02:04 PM
      7 responses
      1,360 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Perr0Grande, Today, 08:16 PM
      0 responses
      5 views
      0 likes
      Last Post Perr0Grande  
      Started by elderan, Today, 08:03 PM
      0 responses
      9 views
      0 likes
      Last Post elderan
      by elderan
       
      Started by algospoke, Today, 06:40 PM
      0 responses
      10 views
      0 likes
      Last Post algospoke  
      Started by maybeimnotrader, Today, 05:46 PM
      0 responses
      14 views
      0 likes
      Last Post maybeimnotrader  
      Working...
      X