Reading the Parameters Window in NinjaScript - NinjaTrader Programming | futures io social day trading
futures io futures trading


Reading the Parameters Window in NinjaScript
Updated: Views / Replies:1,541 / 11
Created: by RCMT 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 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
 
Thread Tools Search this Thread
 

Reading the Parameters Window in NinjaScript

  #1 (permalink)
Elite Member
Vancouver Canada
 
Futures Experience: Beginner
Platform: NinjaTrader,ThinkOrSwim
Favorite Futures: ES
 
Posts: 6 since Mar 2014
Thanks: 3 given, 1 received

Reading the Parameters Window in NinjaScript

As part of my testing philosophy I'd like to be able to read the current NinjaScript parameter window (including not only the user defined Parameters section but also the Data Series, Time Frame, General, Historical Fill Processing, Order Handling and Order Properties sections) so that I can validate them and also so that I can write them out to a text file that is associated with the testing output logs for future reference.

Far too often I've done hours of testing (or even live trading) and then seen something significant when reviewing the logs that my strategies are made to create and puzzled over what the parameters were which created it. I've tried taking screen shots of the Parameters window but that's just clumsy. There HAS to be a better way!

I've searched and found nothing describing how I might accomplish this. I've found a way to iterate through the user defined parameters (How to iterate over all user-created "this.Parameters" in NT Strategy code. - NinjaTrader Support Forum) but it fails my goal in two ways: it only provides the names of the parameters and it only iterates the user defined parameters (the oddly-named "Parameters" section) of the parameters window.

And so I turn to you, imploringly, and ask for assistance.

Any thoughts would be greatly appreciated.


Last edited by RCMT; April 30th, 2014 at 02:18 PM.
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)
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,351 given, 83,223 received


I believe most everything you mentioned is accessible programatically with the right keywords. My NinjaScript is rusty, so others will have to chime in with the necessary info.

But as for the rest, start here:

https://futures.io/elite-circle/29048-saving-loading-parameters-xml-file.html

It provides what you need for loading/saving parameters to/from XML file for strategies and such.

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:
 
  #4 (permalink)
Elite Member
Vancouver Canada
 
Futures Experience: Beginner
Platform: NinjaTrader,ThinkOrSwim
Favorite Futures: ES
 
Posts: 6 since Mar 2014
Thanks: 3 given, 1 received

Thanks Big Mike. At first blush this seems fairly intense for what I'm desiring to do but I'll definitely have a look at it.

I note in that thread that you mentioned loading parameters from a text file on startup. Were these parameters just your own custom parameters or were they system-wide items?

It really surprises me that NT doesn't expose the system-wide parameters in some supported way. I can't believe that I'm the only person who wants to do what I want to do!

I'm not really looking to save and load parameters (although that is unquestionably a cool thing!) I'm more looking to record the current values in a text file so that when I'm looking at my logs I can say with confidence that this was the setup which generated this result.


Last edited by RCMT; April 30th, 2014 at 02:17 PM. Reason: Additional explanation.
Reply With Quote
 
  #5 (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,351 given, 83,223 received


RCMT View Post
It really surprises me that NT doesn't expose the system-wide parameters in some supported way. I can't believe that I'm the only person who wants to do what I want to do!

They do. I just can't remember all the keyword/reserve word names right now and don't have time to go look at my old Ninja source code on another computer. You'll need to ask around, but it is programatically available in NinjaScript.

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
 
  #6 (permalink)
Elite Member
Vancouver Canada
 
Futures Experience: Beginner
Platform: NinjaTrader,ThinkOrSwim
Favorite Futures: ES
 
Posts: 6 since Mar 2014
Thanks: 3 given, 1 received


Big Mike View Post
You'll need to ask around

Mike


Thanks again, Mike. That's why I'm here, plaintively asking..

Is there any supplementary or third-party documentation or web sites (other than futures.io (formerly BMT) of course!) that you recommend for NinjaScript? The Version 7 Help Guide only goes so far.

Reply With Quote
 
  #7 (permalink)
Elite Member
Vancouver Canada
 
Futures Experience: Beginner
Platform: NinjaTrader,ThinkOrSwim
Favorite Futures: ES
 
Posts: 6 since Mar 2014
Thanks: 3 given, 1 received


RCMT View Post
Thanks again, Mike. That's why I'm here, plaintively asking..

Is there any supplementary or third-party documentation or web sites (other than futures.io (formerly BMT) of course!) that you recommend for NinjaScript? The Version 7 Help Guide only goes so far.

Still wondering if anyone has this information...

Mike? Any chance you could look at one of your old computers for this if no one else is forthcoming? Please?

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,351 given, 83,223 received


RCMT View Post
Mike? Any chance you could look at one of your old computers for this if no one else is forthcoming? Please?

No chance. They are in storage and soon will be in the middle of the ocean.

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
 
  #9 (permalink)
Elite Member
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,336 since Dec 2012
Thanks: 11,276 given, 7,090 received

nope


RCMT View Post
Still wondering if anyone has this information...

Nope. Basically it doesn't exist. I would suggest your 2 main routes are to learn C# from books and the web, and learn NinjaScript techniques from downloadable code here on futures.io (formerly BMT). There's plenty of both, but as is traditional with programs writtens by programmers, there's bugger all else for users. There may be a few third-party courses and such if you want to go hunting.

Travel Well
Reply With Quote
 
  #10 (permalink)
Elite Member
Vancouver Canada
 
Futures Experience: Beginner
Platform: NinjaTrader,ThinkOrSwim
Favorite Futures: ES
 
Posts: 6 since Mar 2014
Thanks: 3 given, 1 received


For the record, and for anyone else who wants to access this information, here are the elements that I've found (many converted to strings for consistent reference). The only one that I have not yet been able to find is the "Price based on" field from the Data Series group. You need to assign these to an appropriate variable in order to actually use them:

--- Data Series
ChartControl.BarsArray[0].BarsData.Period.MarketDataType.ToString(); //Price based on (Unsupported code according to NinjaTrader_Cal)
this.BarsPeriod.Value.ToString(); //Type
this.BarsPeriod.Id; // Value
this.Instrument.ToString(); //Instrument

--- Time Frame
this.Days2Load.ToString(); // Days to load
this.SessionData.ToString(); // Session Template

--- General
this.Account.Name; //Account
this.StrategyData.Strategy.CalculateOnBarClose // Calculate on Bars Close
this.Name; //Label
this.MaximumBarsLookBack.ToString(); //Maximum bars look back
this.BarsRequired.ToString(); //Min Bars Required

--- Historical Fill Processing
this.FillType.ToString(); //Fill type
this.Slippage.ToString(); //Slippage

--- Order Handling
this.EntriesPerDirection.ToString(); //Entries per direction
this.EntryHandling.ToString(); //Entry Handling
this.ExitOnClose.ToString(); // Exit on Close
this.ExitOnCloseSeconds.ToString(); // Exit on Close Seconds
this.StopTargetHandling.ToString(); //Stop & Target Submission
this.SyncAccountPosition.ToString(); //Sync Account Position

--- Order properties
this.QuantityType.ToString(); //Set Order Quantity
this.AccountSize.ToString(); // Account Size (for Order Quantity by account size)
this.DefaultQuantity.ToString(); // Default quantity (for Order quantity by default)
this.TimeInForce.ToString(); //Time in Force


Last edited by RCMT; May 17th, 2014 at 07:33 PM. Reason: learned "Price Based On"
Reply With Quote
The following 4 users say Thank You to RCMT for this post:

Reply



futures io > > > > > Reading the Parameters Window in NinjaScript

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
Setting User Parameters traderseeker NinjaTrader Programming 2 March 6th, 2014 06:38 AM
Passing indicator parameters hawks67 NinjaTrader Programming 7 November 29th, 2012 10:04 AM
adding column in Parameters Window ceramictilepro NinjaTrader Programming 1 November 4th, 2011 11:36 PM
Can a floating window be coded with Ninjascript ? trendisyourfriend NinjaTrader Programming 29 December 21st, 2010 05:02 AM
Save parameters from one session to another bukkan NinjaTrader Programming 7 January 4th, 2010 05:54 AM


All times are GMT -4. The time now is 02:36 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-13 in 0.16 seconds with 19 queries on phoenix via your IP 54.163.209.109