Identify Last [right-most] Candle on Static Chart - NinjaTrader | futures trading

Go Back

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

Identify Last [right-most] Candle on Static Chart
Started:March 11th, 2014 (03:10 AM) by Webby Views / Replies:243 / 1
Last Reply:March 11th, 2014 (07:42 AM) 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

Identify Last [right-most] Candle on Static Chart

Old March 11th, 2014, 03:10 AM   #1 (permalink)
Elite Member
Simi Valley, CA
Futures Experience: Intermediate
Platform: NinjaTrader 7
Broker/Data: AMP Futures
Favorite Futures: Oil, Gold
Posts: 10 since Jun 2009
Thanks: 4 given, 3 received

Identify Last [right-most] Candle on Static Chart

I would like to get some help in identifying when the last [right-most] candle has finished drawing on a "static" chart. By "static" chart, I mean that the chart is pulled up based on the data from the last time the Ninjatrader session was closed down/exited, and before the user "connects" manually via the menu option to the data provider to get the latest candles.

Let me share some information on why I need this. I have a function that needs to be triggered to run only on the last candle drawn on the static chart and not any older historical candles before that. I know about the History() function but am still having problems as even the last [right-most] candle is considered historical (on a static chart) before connection to the provider.

Thanks in advance for any suggestions and/or guidance.


Reply With Quote

Old March 11th, 2014, 07:42 AM   #2 (permalink)
Market Wizard
Birmingham UK
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
ratfink's Avatar
Posts: 2,827 since Dec 2012
Thanks: 8,569 given, 5,417 received
Forum Reputation: Legendary

Webby View Post
Thanks in advance for any suggesions and/or guidance.

My thought would be to investigate using a timer (e.g 5 seconds or whatever) which is set on every 'Historical' bar that is processed in OnBarUpdate, thereby each incoming bar would simply reset the time condition and the timer itself would only actually fire on the last bar as you want.

It would obviously not be set at all when running live, and assumes that the specified delay is longer than the time to process each sequential historical bar (probably by a long margin) and short enough not to affect what you want to do (seems likely.)

You also might want to use the TriggerCustomEvent routine if it needs to be data safe within the Ninja data series areas.

I use this sort of technique for saving last bar of session data out to custom ascii files and guaranteeing to get all ticks in and it's been reliable.

Travel Well
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > Identify Last [right-most] Candle on Static Chart

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
Static V Dynamic Dom dee50 NinjaTrader 16 October 17th, 2012 12:24 AM
Setting a static profit target toddma NinjaTrader 4 July 31st, 2012 02:03 PM
Dynamic and static bars indicator esam_jir NinjaTrader Programming 1 March 2nd, 2012 07:22 PM
coding to put range of candle beneath each candle anniebee321 NinjaTrader 13 June 18th, 2010 04:20 PM
chat archive not static doug Feedback and Announcements 2 August 12th, 2009 01:40 PM

All times are GMT -4. The time now is 11:32 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-23 in 0.10 seconds with 20 queries on phoenix via your IP