• 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

Indicator plots correctly on chart but cannot be called on strategy

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

    Indicator plots correctly on chart but cannot be called on strategy

    Dear Sir.

    Im working with Priceactionswing indicator on NT8 the indicator appear in the chart correctly but calling method the indicator can be compiled. The detalied line in the error is:

    PriceActionSwingOscillator1 = PriceActionSwingOscillator(Close, PriceActionSwing.Base.SwingStyle.Standard, 7, 20, false, PriceActionSwing.Base.Show.Trend, true, true, true);

    this line of code cannot be compiled, this line is generated in strategy builder

    thanks

    #2

    Hello memonic, Thanks for your post.

    Did you create the PriceActionSwingOscillator indicator as well? If not, who created it?

    What are the specific errors you see?


    Josh G.NinjaTrader Customer Service

    Comment


      #3
      thanks JoshG

      the indicator was downloaded from

      https://futures.io/local_links.php?a...27&linkid=1734

      the error is calling the indicator in the strategy. is not a valid method

      best regards

      Comment


        #4
        memonic,

        Please write in to PlatformSupport(AT)NinjaTrader(DOT)com and reference this forum post with RE:JOSH in the subject line. Please attach your Log and Trace files to your email so that I may investigate this matter further. You may follow the steps below to attach those files.
        • Open your NinjaTrader folder under My Documents.
        • Right click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        • Send the 2 compressed folders as attachments to this email.
        • Once complete, you can delete these compressed folders.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          Hi Josh,

          Were you able to resolve the issue with PriceActionSwingOscillator indicator being referenced in NT8 Strategy Builder? I'm having the identical issue.

          Thank you.

          Bob

          Comment


            #6
            Hello bob77713,

            I have received your note.

            It is my understanding that this indicator is incompatible with the Strategy Builder due to it using custom enum properties in external classes. I would suggest reaching out to the developer of the indicator if they have a version that is compatible with the Strategy Builder.

            If they have an issue to report with the platform, they may reach out to us to further discuss how it can be made compatible with the Strategy Builder.

            We look forward to assisting.
            Last edited by NinjaTrader_Jim; 06-22-2020, 08:12 AM.
            JimNinjaTrader Customer Service

            Comment


              #7
              Hi Jim,

              I too am struggling with this, and I don't know who the developer was, or how to find them and reach out. Is there any workaround at all, for those of us who must use Strategy Builder? Like building the rest of the strategy in SB, compiling, then unlocking and pasting in the indicator with the right joining language? Or adding the indicator to a custom series? Can you help me do this? Thanks

              Andrew

              Comment


                #8
                I think I understand your comment, let me ask, is there a snippet we can use to translate the enum properties in the private classes to public classes and recompile the indicator? Or better yet, some simple code you can share that would pool the value plots in public classes that are exposed to SB? Am I making sense? I'm new. Sorry.

                Thanks

                Andrew

                Comment


                  #9
                  Hello chinaexpert1a,

                  The script was originally shared on another forum linked in post #3. The developer can be contacted on that forum.

                  We would not have a suggestion for converting enums in sub classes or partial classes. In order to be compatible with the Strategy Builder, properties should be included with the script without inheritance. An example for creating enum properties that would be compatible with the Strategy Builder can be found below.

                  https://ninjatrader.com/support/help...ned_parame.htm

                  Plots are exposed in the Strategy Builder and can be read to derive signals. You can use a New Indicator Wizard to create a template for an indicator and see how plots are added. The Series associated with a plot can then be assigned values in OnBarUpdate. You can reference an indicator like the MACD indicator to see how plots are assigned.

                  New Indicator Wizard - https://ninjatrader.com/support/help.../ns_wizard.htm

                  We look forward to assisting.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    Thank you Jim, that's kind of what I was thinking, It's ok, I have gone another direction.

                    The wizard was very helpful, so you're saying from here, I should just crack open an indicator and copy everything except the calculations, where applicable? I am new to coding, Ninjascript and C#, so I kind of dont know what to do to do as far as the namespace, onstatechange, and formatting the paramenters and other sections. I just know what calculation I want. Can it be explained in a few sentences, or do I have to sit through hours of video? Thanks for your help.

                    Comment


                      #11
                      Hello chinaexpert1a,

                      I wouldn't be able to explain C# and NinjaScripts in a couple sentences. The best way to go down that path would be to utilize educational resources on C# external to NinjaTrader, to get introduced to NinjaScript by using the Strategy Builder to build logical statements and see the resulting syntax, and then to look into building simple indicators that add a plot and then assign a plot a value.

                      AddPlot documentation can be referenced to understand adding plots and assigning values - https://ninjatrader.com/support/help...8/?addplot.htm

                      From there, you will be better acquainted with NinjaScript and indicators and then the process will be clearer for modifying the existing indicator so it uses an enum property like what is linked in post #9.

                      Understanding OnStateChange and the Lifecycle of scripts can be found below.

                      OnStateChange - https://ninjatrader.com/support/help...tatechange.htm

                      NinjaScript Lifecycle - https://ninjatrader.com/support/help...fecycle_of.htm

                      Another approach to learning NinjaScript

                      Another approach would be to follow the tutorials from NinjaTrader 7 and then to follow our Code Breaking Changes page of the Help Guide.

                      Developing Indicators (NinjaTrader 7) - https://ninjatrader.com/support/help...indicators.htm

                      Code Breaking Changes (NinjaTrader 7 to NinjaTrader 8) - https://ninjatrader.com/support/help...ng_changes.htm

                      A final option would be to consider enlisting the services of a NinjaScript Consultant who would be happy to make the modifications at your request. If that is something that interests you, we can have a colleague reply with more information.

                      We look forward to assisting.
                      JimNinjaTrader Customer Service

                      Comment


                        #12
                        Hi Jim,

                        Thanks, I think I will do both. Can you PM your contact for a Ninjascripting quote? Thx

                        Comment


                          #13
                          Hello,

                          This is Chris following up on behalf of Jim.

                          You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

                          The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

                          Let me know if I may be of further assistance.
                          Christopher D.NinjaTrader Customer Service

                          Comment


                            #14
                            Thanks Chris! Helped, great.

                            One last thing, how about the application to be one of those 3rd Party Vendors, do you have a link? I think I've come up with something that the users would like, and I'd like to list too! : )

                            Thanks,

                            Andrew

                            Comment


                              #15
                              Hello chinaexpert1a,

                              Please send an email to info [at] ninjatraderecosystem [dot] com to inquire about joining the EcoSystem.

                              We look forward to assisting.
                              JimNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by gbvryetd, Today, 06:52 AM
                              0 responses
                              0 views
                              0 likes
                              Last Post gbvryetd  
                              Started by jdobgsvs, Today, 06:42 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post jdobgsvs  
                              Started by Spark68, Yesterday, 07:48 PM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by Lotyok, Today, 01:08 AM
                              4 responses
                              25 views
                              0 likes
                              Last Post NinjaTrader_PaulH  
                              Started by Tri-Star, Yesterday, 07:28 PM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_PatrickG  
                              Working...
                              X