Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pivots

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

  • NinjaTrader_DaveI
    replied
    Yes, the same requirement holds true for indicators hosting other indicators, as well. Thank you for sharing your solution with us, as well.

    Leave a comment:


  • strategesis
    replied
    I have good news: I devised a way to do what I need to do, in spite of the new requirements:

    1) During the strategy's State.Configure processing, create the nested indicator (whose name/identity isn't known until run time.)
    2) Query the nested indicator as to which input data series it will need, if any, in addition to the main chart input data series.
    3) Also during the strategy's State.Configure processing, add any additional input data series which any nested indicator needs but the containing strategy wouldn't otherwise add.

    You should consider documenting that solution for the benefit of others.

    Question: Does the same requirement also hold in cases where one indicator is nested inside another?

    Leave a comment:


  • NinjaTrader_DaveI
    replied
    It is always advisable to add data series in State.Configure. You could play around with calling AddDataSeries() in later states, but you may see unexpected results.

    MrBaffalo, we are going to add a bit more to our documentation to cover this requirement in the near future. To get rid of that error, you need to call AddDataSeries() for any bars series that the hosted indicator is calling, in order to provide the data it requires. When the data is being added by the hosting script, the call to AddDataSeries() in the hosted script will be ignored, so you don't have to worry about redundant data loading.

    Leave a comment:


  • MrBaffalo
    replied
    Also, same strategy, If running from a chart I get the hosted indicator error, if running from the control center (same instrument, same settings, same strategy) I have no problem.

    MB

    Leave a comment:


  • MrBaffalo
    replied
    A hosted indicator tried to load additional data. All data must first loaded by the h

    'morning
    same thing here:
    A hosted indicator tried to load additional data. All data must first loaded by the hosting NinjaScript in its configure state.

    Can you please explain how to deal with this? I had no programming error. I am using native SMA and the code is a super easy SMA cross over EOD (Daily) data.
    Thanks
    MB

    Leave a comment:


  • strategesis
    replied
    Question: When is the last lifecycle state (e.g., State.Configure, State.Historical, etc) during which an input data series may be added? And what's the latest lifecycle state that an input data series must be added by a strategy in order for nested indicators that need to use multiple input data series to work correctly?

    Leave a comment:


  • NinjaTrader_Matthew
    replied
    Originally posted by strategesis View Post

    I strongly recommend you reevaluate this architectural decision, since it effectively makes my strategy architecture -- which I've spent years designing for NT7 -- unusable. I would have no choice except to create my own platform if this is not fixed.
    Reversing this decision would lead to missing ticks and synchronization issues which would occur unbeknownst to users/3rd party developers in NinjaTrader 7.

    Furthermore, due to the new multithreaded UI of NinjaTrader 8, there is an implication that the hosted indicator data run in the same data thread as the hosting indicator. The only way to ensure this occurs without running into potential dead locks is to ensure both NinjaScript objects are using the same data stream as the hosting indicators chart.

    Lastly, there was a design decision to ensure that OnBarUpdate is not ran in an object until all required bars are loaded, to prevent further issues with objects becoming out of sync which would happen in early versions as well. In order to do this, the hosting script must be aware of what the hosted indicator is trying to load.

    We realize this creates a new challenge in NT8 on the architectural design of an NT8 indicator/strategy, but it was a design decision which corrects problems which wasted hours of debugging time for developers in earlier versions of NinjaTrader.

    Leave a comment:


  • strategesis
    replied
    This is a huge problem for me: I have a general purpose strategy which is designed to dynamically use a user-selected "MarketAnalyst" indicator which is responsible for generating the entry (and possibly the exit) signals (there can be any number of them to choose from; the user selects the one he wishes by naming it in the Strategy dialog.) By architectural design and intent, the strategy has no way to know what input data series the selected Market Analyst will use -- nor should it. Additionally, the exit rules are also selected by the user using the strategy dialog. He/she would do that by naming an exit rule script written in a DSL (domain specific language) I created for that purpose.

    I strongly recommend you reevaluate this architectural decision, since it effectively makes my strategy architecture -- which I've spent years designing for NT7 -- unusable. I would have no choice except to create my own platform if this is not fixed.

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello strategesis,

    Thank you for your inquiry.

    Yes, this is a change in NinjaTrader 8.

    Documentation is pending to reflect this requirement.

    Leave a comment:


  • strategesis
    replied
    Is that a new requirement in NT8? Because I know for a fact it's not necessary in NT7.

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello NFT-Trader,

    You will only need the 1 day DataSeries.

    Please, let us know if we may be of further assistance.

    Leave a comment:


  • NFT-Trader
    replied
    Thanks that did the trick.

    If the script contains Weekly and Monthly Pivots as well do I need to add those? At first try it does not appear that I do.

    Thanks

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello NFT-Trader,

    This error occurs because you haven't added an additional data series to your strategy to account for the Pivot indicator's daily data series.

    Upon adding the below in else if (State == State.Configure), the error should not longer occur:
    Code:
    else if (State == State.Configure)
    {
         AddDataSeries(BarsPeriodType.Day, 1);
    }
    Please, let us know if this does not resolve your issue.

    Leave a comment:


  • NFT-Trader
    replied
    Here is the Log, which has the error.

    " A hosted indicator tried to load additional data. All data must first loaded by the hosting NinjaScript in its configure state"

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello NFT-Trader,

    Are there any messages that appear in the Log tab of the Control Center or the Output Window when attempting to enable the strategy?

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Angus7, Today, 06:03 AM
0 responses
8 views
0 likes
Last Post Angus7
by Angus7
 
Started by Rhoamajhunm, Today, 05:15 AM
0 responses
10 views
0 likes
Last Post Rhoamajhunm  
Started by cannaleafzcoast, Yesterday, 11:46 PM
0 responses
18 views
0 likes
Last Post cannaleafzcoast  
Started by BiankaRidge, Yesterday, 11:37 PM
0 responses
21 views
0 likes
Last Post BiankaRidge  
Started by RodBlanda, Yesterday, 09:58 PM
0 responses
19 views
0 likes
Last Post RodBlanda  
Working...
X