Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Line 66 Error

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

    Line 66 Error

    Hi all,

    When I try to write an automated strategy (wizard or self-coding) I get the following error message for line 66:

    "A namespace does not directly contain members such as fields or methods."

    Here are a few lines from the code itself:

    63 [Description("Slow Sma")]
    64 [Category(
    "Parameters")]
    65 publicint Slow
    66 {
    67 get { return slow; }
    68 set { slow = Math.Max(1, value); }
    69 }
    70 #endregion

    I can understand if I personally coded something wrong but I don't see why the wizard is giving me this error. I've written plenty with no problem in the past. This has just been a recent issue.

    Thanks in advance,
    Dave

    #2
    Hello,

    Can you provide me with step by step instructions on how to produce this error in the Wizard starting from a totally new strategy?
    DenNinjaTrader Customer Service

    Comment


      #3
      Hi Ben,

      This is exactly what I did:

      From Control Center, Tools - New Ninjascript - Strategy...

      After hitting next I filled in Name with "CrossAbove9100" and "Description" with "Enters long when 9 ema crosses above 100 sma." and hit next.

      Under user defined inputs I labled one as "Fast" with "Fast Ema" and "Slow" with "Slow Sma." I didn't change type, default or min.

      In conditions and actions I set the condition to CrossAbove(EMA(9), SMA(100). 1) to set EnterLong(DeafaultQuantity. "").

      I set a profit target for 8 ticks and a stop loss for 6.

      At that point it says I have successfully configured my strategy. However, when I press "Finish" I get an error message which opens the actual code. At the bottom is where it tells me about line 66.

      Thanks for your help,
      Dave

      Comment


        #4
        Hello,

        I followed your instructions with the following modifications and got not errors:

        - On the user define inputs window: make the names all one word.
        - Use a signal name with your entry order and the same signal name with your profit target and stop loss.

        See if that works.
        DenNinjaTrader Customer Service

        Comment


          #5
          Hi Ben,

          I changed the inputs to one word but I don't understand what you mean by your second direction. Since I used the wizard to create this, the only thing I got to name was the strategy itself.

          Also, I tried copying and pasting previously working codes and simply changed the numbers around. That gave me the same error message. Also, when I try to delete these non-working strategies in the edit ninjascripts window, I am told that it cannot be deleted since "This file is likely referenced by other NinjScript files and these dependencies need to be removed first."

          My best guess is that my download, for lack of a better phrase, broke itself. Would I be better off uninstalling and reinstalling Ninjatrader altogether? Maybe I have some bug?

          Thanks,
          Dave

          Comment


            #6
            Something is messed up with your strategy files and/or their references.

            Email us from help>mail to support and request complete reinstall instructions and ask us how to back up your system prior.
            DenNinjaTrader Customer Service

            Comment


              #7
              And...............sent.

              While I have your ear, is it possible to trade live with real money AND run automated strategies on the simulator? Maybe if I open two sessions?

              Also, I recently went to upgrade to the DOM with the bracket and automated orders but the link on ninjatrader.com brought me to a blank page instead of to paypal. Is there anyone I can contact about that?

              Thanks again,

              Dave

              Comment


                #8
                Well, the reinstall cleared up the programming issues but now I can't connect to AMP despite my entering the correct license, username and password.

                Is there anyone I can contact about that?

                Thanks.

                Comment


                  #9
                  Hello,

                  I just replied to you via email. You will need to contact AMP directly as the login information did not work for me either. Sorry!
                  DenNinjaTrader Customer Service

                  Comment


                    #10
                    Yep....just finished reading it. Thanks again. Any info on my other questions, though? - if I can trade live AND use the simulator at the same time and why the paypal link for the quarterly payments on ninjatrader.com brings me to a blank screen....?

                    Thanks.

                    Comment


                      #11
                      Hello,

                      It looksl like you are using a free trial license key. Yes, I believe you can trade in sim and live with that license by switching back and forth from sim101 to a live account.

                      For the PayPal question, what link exactly? I selected Zen-Fire and clicked the PayPal button on the right and it was not blank for me for the single broker section.
                      DenNinjaTrader Customer Service

                      Comment


                        #12
                        Strange.

                        The following link leads me to a blank page, after having selected Zen-Fire under single-broker. To my knowledge, I am fully updated in both Explorer and Windows:



                        I'm starting to think everyone's out to get me

                        Dave

                        Comment


                          #13
                          Oh and what I meant was can I trade with real money while my custom, automated strategies run on the simulator? Maybe I can open Ninjatrader twice and use two sets of DOMs and charts?

                          Comment


                            #14
                            Hello,

                            With a live license you should be able to select what account you want to trade with and trade on one platform doing what you stated.

                            Running two platforms on one computer is not supported or recommended.

                            As for the link, if you can show me how to reproduce this I will notify our sales department about it.
                            DenNinjaTrader Customer Service

                            Comment


                              #15
                              Of course:

                              I went to ninjatrader.com --> purchase --> lease it --> single broker (zen-fire, $60/month) --> paypal subscribe. I am brought to this page: http://www.ninjatrader-support2.com/...6Subscribe.php but it is blank. I've been trying since yesterday up until two seconds ago.

                              Thanks for the info, Ben. Hopefully, then, I'll be able to test a custom strategy I design against historical data, as I've never tried.

                              Dave

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Kaledus, Today, 01:29 PM
                              1 response
                              7 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by frankthearm, Yesterday, 09:08 AM
                              13 responses
                              45 views
                              0 likes
                              Last Post frankthearm  
                              Started by PaulMohn, Today, 12:36 PM
                              2 responses
                              16 views
                              0 likes
                              Last Post PaulMohn  
                              Started by Conceptzx, 10-11-2022, 06:38 AM
                              2 responses
                              55 views
                              0 likes
                              Last Post PhillT
                              by PhillT
                               
                              Started by yertle, Yesterday, 08:38 AM
                              8 responses
                              37 views
                              0 likes
                              Last Post ryjoga
                              by ryjoga
                               
                              Working...
                              X