Ninja Range Bars With Accurate Closing Values - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Ninja Range Bars With Accurate Closing Values
Started:January 13th, 2013 (05:21 PM) by AllenChuck Views / Replies:758 / 1
Last Reply:January 13th, 2013 (05:21 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Ninja Range Bars With Accurate Closing Values

Old January 13th, 2013, 05:21 PM   #1 (permalink)
Elite Member
Medina Ohio USA
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Amp/CQG
Favorite Futures: Nasdaq 100
Posts: 4 since Aug 2012
Thanks: 1 given, 0 received

Ninja Range Bars With Accurate Closing Values

Has anyone successfully programmed "Type" Range Bars for Ninja (not as an indicator)?
I have had 2 Ninja contractors working on it for over a week now. We cannot get it to work properly when...
* There are 2 Ticks in a row where they have different prices, and we request 1 tick bars.
For example: tick1=750.1, tick2=750.2, tick3=750.3, tick4=750.4, tick5=750.5, etc.
When a sequence occurs similar to the one above, All of these bars are lumped into 1 big bar instead of several smaller bars. The bar would be similar to 750.1 to 750.5!...when it should be:
bar1=750.1 to 750.2, bar2=750.2 to 750.3, bar3=750.3 to 750.4, bar4=750.4 to 750.5
I started with Ninja's Range Bar "Type" code. "time, open, high, close,...etc." all match the Data Manager!
bar.Time, bar.Open, bar.High, ...etc. are all off by at least 1 bar & usually represent the highest high and lowest low for some unknown time range.
When more than 1 bar in a row has the same price, the bars are programmed & work perfectly.
* Tick1=750.1, Tick2=750.1, Tick3=750.2, Tick4=750.2...This results in a bar from 750.1 to 750.2.
This is guts of the code (this is only 1 of dozens of things we have tried!):
if(high - low >= rangeValue)
AddBar(bars, close, close, close, close, time, 0, isRealtime);
UpdateBar(bars, open, high, low, close, time, volume, isRealtime);
* All I am trying to do is create Range Bars where the Close is Valid and was Actually Traded!
* The Open Always Equals the previous Bar's Close
* As soon as the bar equals or exceeds the requested bar height
Close that bar & open a new bar where the Open==the previous Close.

Reply With Quote

Old January 13th, 2013, 05:21 PM   #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.


Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Ninja Range Bars With Accurate Closing Values

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading values from Excel to Ninja spinnybobo NinjaTrader Programming 8 September 13th, 2015 11:23 AM
renko bars vs range bars? shodson Traders Hideout 21 April 26th, 2012 03:52 PM
Range bars before the time a open the Ninja Platform? Barrosco Traders Hideout 4 March 29th, 2011 08:04 AM
nt 7 closing dom prices and chart closing price differ anniebee321 Vendors and Product Reviews 8 December 9th, 2010 07:34 PM
How to set values that Ninja Trader does not support. CryptOrchid NinjaTrader Programming 7 May 14th, 2010 09:51 AM

All times are GMT -4. The time now is 11:45 PM.

Copyright © 2016 by 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 2016-10-21 in 0.08 seconds with 19 queries on phoenix via your IP