Big Mikes beginner Ninja Script Strategy video - NinjaTrader Programming | futures io social day trading
futures io futures trading


Big Mikes beginner Ninja Script Strategy video
Updated: Views / Replies:2,088 / 2
Created: by magnumdbl Attachments:0

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 dont 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

Closed Thread
 
Thread Tools Search this Thread
 

Big Mikes beginner Ninja Script Strategy video

  #1 (permalink)
Elite Member
Cranford, New Jersey, USA
 
Futures Experience: Advanced
Platform: Tradestation, Ninja Trader
Broker/Data: TS and MB Trading
Favorite Futures: ES, EC
 
Posts: 10 since Dec 2010
Thanks: 8 given, 1 received

Big Mikes beginner Ninja Script Strategy video

I typed the following into my ninja trader. Trying to follow exactly what Big Mike did in his video and it didn't compile.

Does anyone see the obvious error?

I took out a few lines of code to meet the size limits for this post.
I am getting CS1501 and 1502 errors as well as a CS1519 error on invalid token 'void' .

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
///<summary>
/// Enter the description of your strategy here
///</summary>
[Description("Make Millions 1/16/2012")]
publicclass DLTestBigMv0 : Strategy
{
// private int smalength = 200 ; // I took these out when it didn't compile
// private int emalength = 100 ; // don't know whether he did also or not.
// private int hmalength = 34 ; // but was getting a compile error with them in.

// private int Target1 = 12 ; // Question 1: Is it OK to leave these in when
// private int Target2 = 10 ; // these are redefined? later ???
// private int Target3 = 24 ;

// private int Stop = 12 ;

// private bool be2 = False ;
// private bool be3 = False ;


///<summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
///</summary>
protectedoverride void Initialize()
{
CalculateOnBarClose =
true;
EntryHandling = EntryHandling.UniqueEntries ;
}
/// do this for each target so you know it will do all 3 and not stop after 1st one //
/// these are OCO ordrs placed right after position is entered.

private void GoLong()
{
SetStopLoss(Target1, CalculationMode.Price, Close[
0] - (Stop*TickSize), false);
SetStopLoss(Target2, CalculationMode.Price, Close[
0] - (Stop*TickSize), false);
SetStopLoss(Target3, CalculationMode.Price, Close[
0] - (Stop*TickSize), false);

SetProfitTarget(Target1, CalculationMode.Price, Close[
0] + (Target1*TickSize));
SetProfitTarget(Target2, CalculationMode.Price, Close[
0] + ((Target1 + Target2)*TickSize));
SetProfitTarget(Target2, CalculationMode.Price, Close[
0] + ((Target1 + Target2 + Target3)*TickSize));

EnterLong(
"Target1") ;
EnterLong(
"Target2") ;
EnterLong(
"Target3") ;

}

private void GoShort()
{
SetStopLoss(Target1, CalculationMode.Price, Close[
0] + (Stop*TickSize), false);
SetStopLoss(Target2, CalculationMode.Price, Close[
0] + (Stop*TickSize), false);
SetStopLoss(Target3, CalculationMode.Price, Close[
0] + (Stop*TickSize), false);

SetProfitTarget(Target1, CalculationMode.Price, Close[
0] - (Target1*TickSize));
SetProfitTarget(Target2, CalculationMode.Price, Close[
0] - ((Target1 + Target2)*TickSize));
SetProfitTarget(Target2, CalculationMode.Price, Close[
0] - ((Target1 + Target2 + Target3)*TickSize));

EnterShort(
"Target1") ;
EnterShort(
"Target2") ;
EnterShort(
"Target3") ;

}

private void ManageOrders() // ??? problem w/ 'void' in this statement ???
// These are only 'on close' not 'intrabar'
{
if (Position.MarketPosition == MarketPosition.Long)
{
if (BE2 && High[0] > Position.AvgPrice + (Target1*TickSize))
SetStopLoss(
"Target2", CalculationMode.Price, Position.AvgPrice, false) ;

if (BE3 && High[0] > Position.AvgPrice + ((Target1 + Target2)*TickSize))
SetStopLoss(
"Target3", CalculationMode.Price, Position.AvgPrice, false) ;
}

if (Position.MarketPosition == MarketPosition.Short)
{
if (BE2 && Low[0] < Position.AvgPrice - (Target1*TickSize))
SetStopLoss(
"Target2", CalculationMode.Price, Position.AvgPrice, false) ;

if (BE3 && Low[0] > Position.AvgPrice - ((Target1 + Target2)*TickSize))
SetStopLoss(
"Target3", CalculationMode.Price, Position.AvgPrice, false) ;
}
}


///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverride void OnBarUpdate() // This section is called at close of every bar
{
EntryHandling = EntryHandling.UniqueEntries ;

SMA SMAV = SMA(SMAlength);
EMA EMAV = EMA(EMAlength);
HMA HMAV = HMA(HMAlength);

ManageOrders() ;
// This section manages Positions and determines if new position indicated.
if (Position.MarketPosition != MarketPosition.Flat) return ; // make sure we are flat.

if (Rising(smav) && Rising(emav) && Rising(hmav))
GoLong() ;
else if (Falling(smav) && Falling(emav) && Falling(hmav))
GoShort() ;
}
#region Properties
[Description(
"")]
[GridCategory(
"Parameters")]
public int smalength
{
get { return smalength; }
set { smalength = Math.Max(1, value); }
}
[Description(
"")]
[GridCategory(
"Parameters")]
public int emalength
{
get { return emalength; }
set { emalength = Math.Max(1, value); }
}
[Description(
"")]
[GridCategory(
"Parameters")]
publicint hmalength
{
get { return hmalength; }
set { hmalength = Math.Max(1, value); }
}
// deleted from here to end to save space. errors occurred above.//

#endregion
}
}

 
  #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)
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,238 since Jun 2009
Thanks: 29,350 given, 83,214 received


Don't put spaces before the semicolon (.

Please use the existing thread:

https://futures.io/ninjatrader/2512-video-tutorial-how-create-advanced-ninjatrader-strategy.html

I think the code was posted there already, if not please re-post there.

I am closing this thread to prevent a split topic.

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.


Closed Thread



futures io > > > > > Big Mikes beginner Ninja Script Strategy video

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone help me make the RC Beginner strategy work in MultiCharts? greyhound MultiCharts 7 February 18th, 2013 06:34 AM
Big mikes Volume graph with arrows. shah1266 NinjaTrader Programming 4 July 9th, 2011 01:43 AM
Ninjatrader7 ATM Strategy combine with Strategy Wizard Ninja Script schuster21 NinjaTrader Programming 4 July 4th, 2011 05:39 PM
Big Mikes Triple EMA VIP DarrenH The Elite Circle 6 May 30th, 2010 12:28 PM


All times are GMT -4. The time now is 07:49 AM.

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-11 in 0.60 seconds with 19 queries on phoenix via your IP 54.226.132.197