NexusFi: Find Your Edge


Home Menu

 





Identify Last [right-most] Candle on Static Chart


Discussion in NinjaTrader

Updated
    1. trending_up 1,550 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 Webby 
Simi Valley, CA
 
Experience: Intermediate
Platform: NinjaTrader 7
Broker: AMP Futures
Trading: Oil, Gold
Posts: 12 since Jun 2009
Thanks Given: 4
Thanks Received: 6

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.

Webby


Follow me on X Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Thanks Mike. Godspeed.
The Elite Circle
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
Datafeed for Atas
Platforms and Indicators
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #2 (permalink)
 
ratfink's Avatar
 ratfink 
Birmingham UK
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: TST/Rithmic
Trading: YM/Gold
Posts: 3,550 since Dec 2012
Thanks Given: 17,423
Thanks Received: 8,427


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
Visit my NexusFi Trade Journal Reply With Quote




Last Updated on March 11, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts