Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Last Historical Bar?
Collapse
X
-
Can you clarify the meaning of "scroll point"? A screenshot with your notes on it will easily explain.
-
HI Guys,
I would like to do exactly what Freen has requested here.
Bertrand, I tried your solution.... am I missing something here because your suggested code still only allows the indicator to load if it is the last bar on the chart. "Bars.Count" returns the same value as "Count" for me. So therfore your code will skip every bar until we are at Count - 2 which is when all historical bars are already loaded. What if we want the indicators code to only initiate once the CurrrentBar has arrived at the current scroll point of the chart?
Leave a comment:
-
Hi Frederik, try doing your calcs then in a condition like this :
if (Bars.Count - 2 == CurrentBar && Historical)
{
do calcs on last historical bar
}
Leave a comment:
-
Last Historical Bar?
Any suggestion on how to trigger OnBarUpdate on last historical bar only?
Bars.LastHistorical or Bars.Loaded properties would be handy properties for this purpose.
The indicator I´m working with uses Infinite lookback and performs all historical calculations (0 -> CurrentBar looping) on each bar - hence last historical/current bar update only would make loading faster.
Kindly, FredrikLast edited by FREEN; 11-09-2011, 04:25 AM.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RideMe, 04-07-2024, 04:54 PM
|
5 responses
28 views
0 likes
|
Last Post Today, 08:48 AM | ||
Started by f.saeidi, Today, 08:13 AM
|
1 response
4 views
0 likes
|
Last Post Today, 08:47 AM | ||
Started by DavidHP, Today, 07:56 AM
|
1 response
5 views
0 likes
|
Last Post Today, 08:16 AM | ||
Started by kujista, Today, 06:23 AM
|
3 responses
9 views
0 likes
|
Last Post
by kujista
Today, 08:15 AM
|
||
Started by Mindset, Yesterday, 02:04 AM
|
2 responses
18 views
0 likes
|
Last Post Today, 08:15 AM |
Leave a comment: