PDA

View Full Version : Line 66 Error


dsraider
08-15-2009, 09:00 AM
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

NinjaTrader_Ben
08-15-2009, 12:00 PM
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?

dsraider
08-15-2009, 12:59 PM
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

NinjaTrader_Ben
08-15-2009, 05:37 PM
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.

dsraider
08-15-2009, 05:48 PM
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

NinjaTrader_Ben
08-15-2009, 05:54 PM
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.

dsraider
08-15-2009, 06:02 PM
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

dsraider
08-16-2009, 10:11 AM
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.

NinjaTrader_Ben
08-16-2009, 11:26 AM
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!

dsraider
08-16-2009, 11:30 AM
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.

NinjaTrader_Ben
08-16-2009, 11:37 AM
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.

dsraider
08-16-2009, 11:42 AM
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:

http://www.ninjatrader-support2.com/sugar/Nt6Subscribe.php

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

Dave

dsraider
08-16-2009, 02:52 PM
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?

NinjaTrader_Ben
08-16-2009, 05:53 PM
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.

dsraider
08-16-2009, 06:02 PM
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/sugar/Nt6Subscribe.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