Basic Indicator Issues - NinjaTrader Programming | futures io social day trading
futures io futures trading

Basic Indicator Issues
Updated: Views / Replies:525 / 3
Created: by halliwm 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 100,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

Thread Tools Search this Thread

Basic Indicator Issues

  #1 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Piano
Posts: 2 since Mar 2013
Thanks: 1 given, 0 received

Basic Indicator Issues

Hi, I have been trying to create a simple indicator that takes the amount of time in a period before the latest low and a high and charts it. Basically it is ((period - bars since high/low)/period)*100. I am having trouble getting it to plot, it just shows up as flat line at 0. I also tried to print the values but I get nothing.

I've included the code below but I also have a question about DataSeries. Do I need to create a DataSeries for the indicator values to be stored in? and if not what types of indicators do you use it for? And lastly I am determining which bar out of the period contains the high or low through a for loop. Is there a better method to finding those bar index's? Cheers and thanks in advance.

// Wizard generated variables
private int numPeriod = 1; // Default setting for NumPeriod

// User defined variables (add any user defined variables below)
private double outputHigh;
private double outputLow;
private int highIndex;
private int lowIndex;
private double highest;
private double lowest;

protected override void Initialize()
Add(new Plot(Color.FromKnownColor(KnownColor.LimeGreen), PlotStyle.Line, "HighOutput"));
Add(new Plot(Color.FromKnownColor(KnownColor.Maroon), PlotStyle.Line, "LowOutput"));
Overlay = false;
CalculateOnBarClose = false;

protected override void OnBarUpdate()
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.

if (CurrentBar<numPeriod)

// first needs to find how many bars since high and low and store them in their respective variables.

//Could do a for loop to determine index position of high and low

//Assumes current bar has high/low

for (int i=1; i<numPeriod; i++)
if (Bars.GetDayBar(i).High > highest)

if (Bars.GetDayBar(i).Low<lowest)


//store in respective output variables

//set plots



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
Berlin, Europe
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
Fat Tails's Avatar
Posts: 9,693 since Mar 2010
Thanks: 4,228 given, 25,790 received
Forum Reputation: Legendary

You would need to attach your entire indicator file. This is too difficult to read and noone can test it for bugs.

To attach files you will probably need a few more posts (I think it was 5 posts that are required).

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,427 since Jun 2009
Thanks: 29,510 given, 84,395 received

Fat Tails View Post
To attach files you will probably need a few more posts (I think it was 5 posts that are required).

Everyone can attach files from post 1. You can't embed URL's with < 5 posts.


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.
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:


futures io > > > > > Basic Indicator Issues

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

July Journal Challenge - $500 in Amazon Gift Cards!


AXESS Trader: Powerful Cloud Based Trading Platform w/GFF Brokers

Jul 17

TBA: FuturesTrader71 w/Morad Askar

Elite only

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT indicator disappearing issues? mojord NinjaTrader 6 March 21st, 2014 03:47 AM
Basic NinjaScript Help Joseph689 NinjaTrader Programming 2 October 28th, 2013 05:48 PM
Adding a Bollinger Band to a CCI indicator issues NinjaTrader 0 May 8th, 2012 06:49 PM
TS / MC : Basic Indicator Help? Micardo EasyLanguage Programming 2 February 27th, 2011 11:30 AM
SwingTemp Indicator Issues RJay NinjaTrader 5 October 13th, 2010 02:13 PM

All times are GMT -4. The time now is 10:33 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-07-15 in 0.10 seconds with 14 queries on phoenix