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
-
I see. Your answer was tied to the scenario in the asked question.
By the way, what is the meaning of Osikani? Can you explain it to all the people here.
Thank you Koganam.
-
Originally posted by ninZa View PostPlease check it Koganam.
Yesterday I played with both of them. Changing COBC to false increased the value of LastBarIndexPainted by 1 (for the actual last bar on chart). So LastBarIndexPainted is dependent on COBC.
Just from the logic, we can also tell that a thing related to ChartControl (ChartControl.LastBarPainted) cannot be dependent on COBC.
This question: http://www.ninjatrader.com/support/f...90&postcount=6
Put the display into "threaded" mode, and you will see that that is the question to which I was responding.Last edited by koganam; 02-04-2015, 09:44 PM.
Leave a comment:
-
Originally posted by koganam View PostCould be, but I am pretty sure that what I wrote is correct.
Yesterday I played with both of them. Changing COBC to false increased the value of LastBarIndexPainted by 1 (for the actual last bar on chart). So LastBarIndexPainted is dependent on COBC.
Just from the logic, we can also tell that a thing related to ChartControl (ChartControl.LastBarPainted) cannot be dependent on COBC.
Leave a comment:
-
Originally posted by ninZa View PostMy skill is googling Koganam lol.
Regarding your comment about the dependence on COBC, should we reverse the order? I mean the 1st one (ChartControl) should be absolute, and the 2nd one is dependent on COBC?
Leave a comment:
-
Originally posted by koganam View PostProbably from here: http://www.ninjatrader.com/support/f...d.php?p=261631
Though, given his skills, Ninza may have come upon that independently.
Regarding your comment about the dependence on COBC, should we reverse the order? I mean the 1st one (ChartControl) should be absolute, and the 2nd one is dependent on COBC?Last edited by ninZa; 02-04-2015, 06:21 PM.
Leave a comment:
-
Originally posted by marty087 View PostBOOM! Worked a charm. Where did you pull that one from?
Thanks.
Though, given his skills, Ninza may have come upon that independently.
Leave a comment:
-
Originally posted by marty087 View PostBOOM! Worked a charm. Where did you pull that one from?
Thanks.
I don't remember where I got the info of LastBarIndexPainted. Perhaps searched something on Google and found it.
Regards.
Pi
Leave a comment:
-
Originally posted by ninZa View Postmarty087, please try LastBarIndexPainted. I'm not sure this works in your case. This will give you the last bar painted on chart after the bars are loaded. In your case, you want to get the value in advance, so I'm not sure. Please test it, if it doesn't work, we will have to take another approach.
Thanks.
Thanks.
Leave a comment:
-
Originally posted by marty087 View PostIn short....
CurrentBar returns the id of the last bar displyed on the right of the screen irrecpective of whether the chart is scrolled to the end or not.
Count OR Bars.Count returns how many bars are in the chart once fully loaded / scrolled to the right alll the way
So..... if i am in the middle of the chart and want my indicator to only execute once it has arrived at the furtherest scrooled bar, is there any way to do this?
FREEN, is it fair to say that the supplied code below (Bertrand's contribution) didnt provide a solution for you?
Cheers Guys.
However, if in a live market with fast coming data, you can execute the following unsupported codes to ignore all bars until the last painted bar:
if (ChartControl.GetXByBarIdx(BarsArray[0], CurrentBar) < ChartControl.CanvasRight) return;
PiLast edited by ninZa; 02-04-2015, 03:08 AM.
Leave a comment:
-
marty087, please try LastBarIndexPainted. I'm not sure this works in your case. This will give you the last bar painted on chart after the bars are loaded. In your case, you want to get the value in advance, so I'm not sure. Please test it, if it doesn't work, we will have to take another approach.
Thanks.Last edited by ninZa; 02-04-2015, 02:22 AM.
Leave a comment:
-
In short....
CurrentBar returns the id of the last bar displyed on the right of the screen irrecpective of whether the chart is scrolled to the end or not.
Count OR Bars.Count returns how many bars are in the chart once fully loaded / scrolled to the right alll the way
So..... if i am in the middle of the chart and want my indicator to only execute once it has arrived at the furtherest scrooled bar, is there any way to do this?
FREEN, is it fair to say that the supplied code below (Bertrand's contribution) didnt provide a solution for you?
Cheers Guys.
Leave a comment:
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by r68cervera, Today, 05:29 AM
|
0 responses
3 views
0 likes
|
Last Post
by r68cervera
Today, 05:29 AM
|
||
Started by geddyisodin, Today, 05:20 AM
|
0 responses
6 views
0 likes
|
Last Post
by geddyisodin
Today, 05:20 AM
|
||
Started by JonesJoker, 04-22-2024, 12:23 PM
|
6 responses
35 views
0 likes
|
Last Post
by JonesJoker
Today, 05:14 AM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
12 responses
3,241 views
0 likes
|
Last Post
by Leafcutter
Today, 05:08 AM
|
||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
0 responses
7 views
0 likes
|
Last Post
by AveryFlynn
Today, 04:57 AM
|
Leave a comment: