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

Return of non plot values from an indicator as a series

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

    Return of non plot values from an indicator as a series

    Hello there, as i could not reply a question to the below i am including the link



    i have a number of non plot dataseries that in the design i am returning to a strategy or indicator that calls this indicator. I followed the article checked the syntax of the enclosed code samples.

    The DataSeries that i set up and make public in the Properties section is exposed fine and i can see when i try to create a strategy using the wizard ie i can see the series listed in the available plots for use in conditional tests etc.
    The BoolSeries however i DO NOT see in the plot list in the strategy wizard and i have checked the code with the sample and all is exact. Is there anything different or i may be missing for the BoolSeries to return values?
    Is there a limit to the number of series that can be returned ... ie have 6 drawplots as part of the indicator and then 8 DataSeries and 4 BoolSeries. All 8 DataSeries and 6 Plots i can see in the strategy wizard but i do not see any of the BoolSeries defined.

    If anything is unclear i can obviously clarify.

    thanks

    #2
    Hello,

    Thank you for the question.

    If you are using the sample exactly as it is, the bool series that are defined are specifically defined so they will not show up in the user interface with [Browsable(false)]. Also a bool series is not a Plot, so this would not be expected to show up in the Wizard under the Plots dropdown.

    If you are trying to use a BoolSeries as a Signal for a strategy in the wizard, I would recommend instead just using a Plot or DataSeries and using 1 for true and 0 for false. The chart has no scale for bool true or false, only numbers, so it would need to be a plot or DataSeries to be used in the wizard.

    When Manually programming, this is not the case, you could instead pick the bool series and compare this to true or false as you have more control over the data selections when manually coding.

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

    Comment


      #3
      Thanks for the reply. The reason i am testing this is as it is for someone else to be able to potentially use in a strategy. So using the syntax for the BoolSeries as per example it WOULD be accessible in a strategy or indicaotr if being manually programmed. All the other Properties definitions ie of DataSeries are also set to Browseable(false) yet they appear in the strategy wizard. WHilst Boolseries isnt a plot per say it had validity in that the values of true or false are to be used in a conditional test. So only DataSeries with values are included in the strategy wizard drop down and any BoolSeries are automaticall excluded by design? If this is a feature and the BoolSeries currently is only accessible manually in programming as per the example then i can accept this limitation and workaround and explain to the concerned party.

      thanks

      Comment


        #4
        Hello,

        Yes this would be by design, the dropdown in the wizard is very specific for what you can select because the wizard in general can only do so much before you would need to manually code.

        The [Browsable(false)] is simply to make the property not show up in the properties panel when in the chart, so that really does not have anything to do with the BoolSeries specifically in this situation. I just wanted to mention it because the sample demonstrates it to make sure there is no confusion about it.

        When using the wizard, you will find other items like this where you need a work around from standard programming logic, one example is using true or false in the wizard. Because the wizard does not support bool, you would instead work around that by using a UserVariable and using 1 or 0 for true or false. These are the caveats of using the wizard VS manually coding, the wizard does allow for point and click quick creation of strategies but will really depend on what you are doing if it will need manually coded or not.

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

        Comment


          #5
          Thank you for your assistance, that is clear now and i understand the workaround required and which aspects need to be manually coded which in all likelihood the other party will be doing anyways
          thanks

          Comment


            #6
            Hello there just another question on this. I tried yesterday to instead of using a BoolSeries use an IntSeries and set values to 0 or 1 based on idea from your explanation of strategy wizard limitations. This additionally does NOT appear in the strategy wizard drop down for plots. Is this expected to and such that i must edit manually when using Int or Bool values set in a series returned and made public in the properties section of my indicator. Just wanted to confirm so i can explain to other party on how to handle the returned values
            thanks

            Comment


              #7
              Hello soulfx,

              Thank you for your response.

              That would be expected, just pass the int to a plot so you can call it from the Strategy Wizard.

              Comment


                #8
                Hello there, sorry you have confused me now perhaps i wasnt clear in my last post.
                It is not possible to access and Int Series (just as with a Bool Series) returned from an indicator in the strategy wizard?
                Your mention of ... ' just pass the int to a plot so you can call it from the Strategy Wizard.' doesnt make sense in this context ... it is dataseries which works fine and intSeries that i am working with.
                Can you clarify thanks so i can proceed with the correct information.
                If accessing the Int Series returned can only be done manually then that is fine. But i am thrown by your above comment.

                Comment


                  #9
                  Hello soulfx,

                  Thank you for your response.

                  Correct, IntSeries would fall into the same case as BoolSeries as they are both not plots. What I meant was instead of assigning your value to the IntSeries, create a new plot and assign the int to the plot instead. That way you can call that value form within the Strategy Wizard.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by cmtjoancolmenero, Yesterday, 03:58 PM
                  1 response
                  17 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by benmarkal, Yesterday, 12:52 PM
                  3 responses
                  23 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by helpwanted, Today, 03:06 AM
                  1 response
                  20 views
                  0 likes
                  Last Post sarafuenonly123  
                  Started by Brevo, Today, 01:45 AM
                  0 responses
                  12 views
                  0 likes
                  Last Post Brevo
                  by Brevo
                   
                  Started by pvincent, 06-23-2022, 12:53 PM
                  14 responses
                  244 views
                  0 likes
                  Last Post Nyman
                  by Nyman
                   
                  Working...
                  X