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!
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
NinjaTrader
BarRequest.Update
Collapse
X
-
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.
-
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.
Leave a comment:
-
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.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 11:49 AM
|
4 responses
14 views
0 likes
|
Last Post
by mcosta72
Today, 01:21 PM
|
||
Started by spottysallrite, Today, 11:31 AM
|
5 responses
12 views
0 likes
|
Last Post Today, 01:20 PM | ||
Started by yaniv, Today, 12:50 PM
|
1 response
2 views
0 likes
|
Last Post Today, 01:15 PM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
10 responses
32 views
0 likes
|
Last Post Today, 01:04 PM | ||
Started by Padan, Today, 02:02 AM
|
7 responses
19 views
0 likes
|
Last Post Today, 12:59 PM |
Leave a comment: