NinjaScript is beating me - NinjaTrader Programming | futures io social day trading
futures io futures trading


NinjaScript is beating me
Updated: Views / Replies:1,885 / 11
Created: by jtradr Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 3  
 
Thread Tools Search this Thread
 

NinjaScript is beating me

  #1 (permalink)
Trading Apprentice
Connecticut
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received

NinjaScript is beating me

Hi all,

I'm new here and have been working for the last few days on a strategy off a custom indicator. On Monday I had zero experience programming and now I think I actually have less somehow. I was just about to shoot myself till I thought I would ask here for some help.

I have a strategy based off the strategy walkthrough that Mike put up and when I used the code it is absolutely fraught with errors. I won't cut and paste the entire thing in here but if someone is looking at this and sees a problem please help me out.

[Description("")]
[GridCategory("Parameters")]
public bool BE2
{
get { return be2; }
set { be2 = value; }
}
#endregion
}
}


This piece of code returns three { or ; expected errors alone.

Additionally there are 128 lines of code in the strategy and in the error box there are errors preventing me from compiling on lines 133 through 150. I would fix them if only they existed.

Thanks in advance

if (Code = Fixed) return;
else kill self;

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received


 
Code
if (Code = Fixed) return;
else kill self;
Watch that if statement. The single '=' assigns value 'Fixed' to variable 'Code'. To compare them for equilty you need to use '=='.

Also, the name of the 'kill self' method needs to be contiguous ie 'kill_self' or 'killSelf', and if there are no overrides it would be 'killSelf()'.

I prefer the AskForHelp() or HaveABeerAndThinkAboutIt() methods personally...

Reply With Quote
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received

Without posting the file, no one can help you. Your snippet is not enough. You also need to specify what version of NT you are using.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Connecticut
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received

Sorry about that but I appreciate any help. I'll attach the file to this post.

Thank you in advance.

I'm using NT7

Attached Files
Register to download File Type: cs BigMikeHelp.cs (3.8 KB, 7 views)

Last edited by jtradr; January 13th, 2011 at 10:56 PM. Reason: update
Reply With Quote
 
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received

The code looks fine.

The problem is somewhere else most likely. I don't use NT anymore, so am only eyeballing it.

Post a screen shot of the compilation errors (the bottom of the page with all the error messages). Make sure you expand (widen) the columns so we can see everything. It should be telling you the filename of the problem script.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Connecticut
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received

Hmmm now that you bring it up the errors seems to be in a file I am not using. Here is the screen

Attached Thumbnails
NinjaScript is beating me-bigmikehelpscreen.jpg  
Reply With Quote
 
  #8 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


jtradr View Post
Hmmm now that you bring it up the errors seems to be in a file I am not using. Here is the screen

I've done this a few times

Start by deleting the strategy "MyMoneyMakerLearn". You may have to delete it using Windows Explorer from your Documents/NinjaTrader/bin/custom/strategy directory.

Then recompile. If there is still an error, you need to widen the "Error" column, because we can't see the full error message on the top error (duplicate namespace).

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #9 (permalink)
Elite Member
Asia
 
Futures Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 786 received

 
Code
EntryHandling = EntryHandling.UniqueEntires;
Is the wrong syntax or needs to be in the Initialize() method.

Reply With Quote
The following user says Thank You to MXASJ for this post:
 
  #10 (permalink)
Trading Apprentice
Connecticut
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 26 since Dec 2010
Thanks: 16 given, 27 received


That helped immensely but now there are two and one is so long I can't fit the thing in the window, hopefully you can get the jist.

And just in case the first error is in BigMikeHelp.cs the file I just made for you
and the second is mycustomstrategy.cs also not in use.

Attached Thumbnails
NinjaScript is beating me-bigmikehelpscreen2.jpg  
Reply With Quote

Reply



futures io > > > > > NinjaScript is beating me

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninjascript errors incometrade NinjaTrader Programming 10 November 6th, 2015 03:29 PM
NinjaScript Coding crazyhorse2393 NinjaTrader Programming 19 August 3rd, 2014 09:11 PM
Ninjascript Optimizations shodson NinjaTrader Programming 3 June 25th, 2010 04:50 AM
Ninjascript How TO spinnybobo NinjaTrader Programming 2 October 29th, 2009 11:34 AM
Beating yourself up... Meggs Psychology and Money Management 2 September 6th, 2009 11:47 AM


All times are GMT -4. The time now is 02:11 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-15 in 0.11 seconds with 20 queries on phoenix via your IP 54.82.56.95