Go Back   NinjaTrader Support Forum > NinjaTrader 7 > General Development

General Development General NinjaScript development questions.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 11-15-2010, 10:08 AM   #1
byi777
Junior Member
 
Join Date: Nov 2010
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default How to create Indicator with more than 4 parameters

Hello!

I'm using NT 7 RC1.
Tried to create new Indicator using Indicator Wizard with 6-7 parameters.
Indicator Wizard allowed create only 4 parameters ( It has only 4 fields to fill out) .
How I could incorporate more than those 4 parameters?

Should I go into script and modify appropriate areas, including restricted area:

#region NinjaScript generated code. Neither change nor remove.

Thanks
YB
byi777 is offline  
Reply With Quote
Old 11-15-2010, 10:17 AM   #2
NinjaTrader_RyanM1
NinjaTrader Customer Service
 
NinjaTrader_RyanM1's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,127
Thanks: 249
Thanked 434 times in 427 posts
Default

Hello byi777,

Welcome to the NinjaTrader forums!

You can add additional parameters with code. The structure for this is covered in this forum post:
http://www.ninjatrader-support.com/v...ead.php?t=5782

To add the parameters you work in the properties region, not the NinjaScript generated code section.
NinjaTrader_RyanM1 is offline  
Reply With Quote
Old 11-15-2010, 11:38 AM   #3
byi777
Junior Member
 
Join Date: Nov 2010
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Thank you, Ryan,
It worked well and generate proper code in restricted area.

Only one minor issue - parameters were placed in generated code and in Indicator properties in alphabetical order - I would like to have it in the same order I've placed them in “Variables” and/or “Properties” section.
Could I control this order or just have some prefixes to parameters names,which will create alphabetical order matching order I would like to have.

Thanks
YB
byi777 is offline  
Reply With Quote
Old 11-15-2010, 11:47 AM   #4
NinjaTrader_RyanM1
NinjaTrader Customer Service
 
NinjaTrader_RyanM1's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,127
Thanks: 249
Thanked 434 times in 427 posts
Default

Yes, you can control the order of parameters. This forum post can help:
http://www.ninjatrader.com/support/f...ead.php?t=4770
NinjaTrader_RyanM1 is offline  
Reply With Quote
Old 06-15-2017, 02:09 AM   #5
Slide588
Junior Member
 
Join Date: Jan 2016
Posts: 7
Thanks: 0
Thanked 1 time in 1 post
Default Add more than 4 parameters to indicator

Quote:
Originally Posted by NinjaTrader_RyanM1 View Post
Hello byi777,

Welcome to the NinjaTrader forums!

You can add additional parameters with code. The structure for this is covered in this forum post:
http://www.ninjatrader-support.com/v...ead.php?t=5782

To add the parameters you work in the properties region, not the NinjaScript generated code section.
Hi, am trying to add more than 4 parameters for an indicator. Have tried the suggested link which is broken. While I can add the parameters in the code and it compiles, only 4 display. How do I fix this?
Slide588 is offline  
Reply With Quote
Old 06-15-2017, 07:39 AM   #6
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 40
Thanks: 0
Thanked 7 times in 7 posts
Default

Hello,
Thank you for the post.
Please see this forum post for adding additional parameters to your indicator:
http://ninjatrader.com/support/forum...84&postcount=1
If questions come up or if we may be of any further assistance, please let us know.
NinjaTrader_ChrisL is offline  
Reply With Quote
Old 06-16-2017, 09:09 AM   #7
Slide588
Junior Member
 
Join Date: Jan 2016
Posts: 7
Thanks: 0
Thanked 1 time in 1 post
Default

Quote:
Originally Posted by NinjaTrader_ChrisL View Post
Hello,
Thank you for the post.
Please see this forum post for adding additional parameters to your indicator:
http://ninjatrader.com/support/forum...84&postcount=1
If questions come up or if we may be of any further assistance, please let us know.
Hi Chris. I can add the parameters, have lots of coding experience. The problem is the new parameters do not show in the display window of the indicator when I add it to the chart. In fact only the ones created with the initial indicator creation setup do.

So, added new parameters, compiled the code, add the indicator to chart, can't see extra added parameters. Do you know what I'm missing?

Thanks.
Slide588 is offline  
Reply With Quote
Old 06-16-2017, 10:17 AM   #8
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 40
Thanks: 0
Thanked 7 times in 7 posts
Default

Hello,
Thank you for the reply.
Please send me your code file to*platformsupport[at]ninjatrader[dot]com.*
You can do this by going to the Control Center-> Help-> Mail to Platform Support.
Please reference the following in the email body:*"ATTN ChrisL http://ninjatrader.com/support/forum/showthread.php?t=35560"

I look forward to assisting further.
NinjaTrader_ChrisL is offline  
Reply With Quote
Old 06-19-2017, 02:21 PM   #9
NinjaTrader_ChrisL
NinjaTrader Customer Service
 
NinjaTrader_ChrisL's Avatar
 
Join Date: Apr 2017
Location: Denver, CO
Posts: 40
Thanks: 0
Thanked 7 times in 7 posts
Default

Hello,
Thank you for your patience.
Your 'IsEnabled' was named 'Enabled' in your properties region. The private bool variable is called 'isEnabled' so you will need to change 'Enabled' on line 123 to 'IsEnabled'.
You need to change line 56. You are using your UI parameter name instead of the private variable so change 'Enabled' to 'isEnabled' on line 56.
Please let me know if I may be of any further assistance.
NinjaTrader_ChrisL is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to create a new constructor for an indicator adamus Indicator Development 9 08-07-2013 03:01 PM
When indicator parameters not in Parameters category MikeInMA Strategy Development 3 11-08-2010 04:24 PM
Indicator Accessing Indicator Where User Has Set Parameters dkrumholz Indicator Development 1 04-27-2010 02:56 PM
How to create 1/vix indicator? rc5781 Platform Technical Support 3 12-05-2008 10:19 AM
Is it possible to create a private indicator? ooppie General Development 2 05-26-2008 11:36 PM


All times are GMT -6. The time now is 09:26 PM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content. Visit the CFTC resources for education regarding the industry and signs of fraud.