Help Defining Variables in NT Indicator Code - NinjaTrader | futures io social day trading
futures io futures trading


Help Defining Variables in NT Indicator Code
Updated: Views / Replies:766 / 2
Created: by resirca52009 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
 

Help Defining Variables in NT Indicator Code

  #1 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received

Help Defining Variables in NT Indicator Code

Need help determining where and how to declare the variables for this chop indicator code. I am having trouble figuring this out from the NT help guide. Code calculation below :
{
double ChopIndicator = ((100 * Log10 (sum(atr(1),14)/maxhi(14)- minlo(14)))/log10(14));
{

Does this go in the variable section, the onbarupdate section, both or neither ? Would all these be double types also ?
Confused ?
After they are defined can I call them with :
Plot0.Set(value);
Plot1.Set(value);
etc, etc,

Thanks,
Richard

Reply With Quote
 
  #2 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received

Answer
This post has been selected as an answer to the original posters question Answer


resirca52009 View Post
Need help determining where and how to declare the variables for this chop indicator code. I am having trouble figuring this out from the NT help guide. Code calculation below :
{
double ChopIndicator = ((100 * Log10 (sum(atr(1),14)/maxhi(14)- minlo(14)))/log10(14));
{

Does this go in the variable section, the onbarupdate section, both or neither ? Would all these be double types also ?
Confused ?
After they are defined can I call them with :
Plot0.Set(value);
Plot1.Set(value);
etc, etc,

Thanks,
Richard

Probably the easiest way for you to learn would be to examine the code of the NinjaTrader SMA indicator. You will see a region called variables which is where most variables would be declared. To plot your indicator you will need to add a "Plot". Looking at the SMA you will see where calculations are made with the output to "Value" using .Set.

So understand that creating a plot associates automatically with Value.

You might look a few simple NinjaTrader indicators to get a better idea. Be careful not to get into the most complicated or you will risk certain insanity.

Good luck

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
The following user says Thank You to Tasker_182 for this post:
 
  #3 (permalink)
Elite Member
Salt Lake City, UT
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Dormans/Zen-fire
Favorite Futures: 6E ES YM
 
Posts: 233 since Mar 2010
Thanks: 46 given, 321 received

Answer
This post has been selected as an answer to the original posters question Answer



resirca52009 View Post
Need help determining where and how to declare the variables for this chop indicator code. I am having trouble figuring this out from the NT help guide. Code calculation below :
{
double ChopIndicator = ((100 * Log10 (sum(atr(1),14)/maxhi(14)- minlo(14)))/log10(14));
{

Does this go in the variable section, the onbarupdate section, both or neither ? Would all these be double types also ?
Confused ?
After they are defined can I call them with :
Plot0.Set(value);
Plot1.Set(value);
etc, etc,

Thanks,
Richard



In onbarupdate, this is how I would do it


double value = ((100 * Log10 (sum(atr(1),14)/maxhi(14)- minlo(14)))/log10(14));
Plot0.Set(value);



do look at the other indicators as mentioned

Reply With Quote
The following user says Thank You to tulanch for this post:

Reply



futures io > > > > Help Defining Variables in NT Indicator Code

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
Global variables in NT Geir NinjaTrader Programming 24 March 31st, 2016 05:19 PM
NT - How to set ATM Quantity via NT script code Adfra The Elite Circle 1 November 11th, 2013 04:00 AM
NT Change Indicator code vitto The Elite Circle 1 January 30th, 2013 05:31 PM
NT code problem lincor NinjaTrader 8 November 21st, 2012 07:00 AM
Need confirmation of NT code please Saroj NinjaTrader Programming 4 September 26th, 2009 01:51 PM


All times are GMT -4. The time now is 02:50 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-12 in 0.07 seconds with 25 queries on phoenix via your IP 54.90.207.75