thankz
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 bar in training
Collapse
X
-
Hello faustf,
Thanks for your post.
The definition of "penultimate" is "last but one in a series of things; second last.", so is your question why does the index[0] point to the prior closed bar and not the currently forming one or is your question as stated "how is possible have a body value"?
If penultimate is the issue and you really want the current forming candle, then you would change the CalculateOnBarClose from true to false as this will then make the index of [0] point to the currently forming bar and [1] would now be the penultimate bar. Please note that in this mode, the Open value will not change but the Close value will continually change until the bar is completely closed. The penultimate bars values will not change.
To get the body value of the candle, the body is defined as the distance between the Close and Open points of the candle, so Close[0] -Open[0] (or Open[0] - Close[0]) Reference: https://en.wikipedia.org/wiki/Candlestick_chart
Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment