BackBrushes[-1] = backBrush;
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
Background color (backBrush) of future bar
Collapse
X
-
Hello cutzpr,
Drawing objects use slots in the chart which is a little different of a concept so technically those can draw to a certain extent into the future although that is not supported in NinjaScript and has issues with rendering in certain use cases. In general there is no ability to reference future bars because they have not been processed yet. All scripts are intended to process bars as they come in and reference bars in the past that are available at the time of processing.
JesseNinjaTrader Customer Service
Comment
-
Hello cutzpr,
No there is no support for drawing into the future with NinjaScript, you can with some objects technically use negative bars ago but that can also cause problems. I wouldn't be able to assist with that type of logic. If you want to draw into the future with a drawing object you can use a Ray which does a rendering projection with the chart coordinates rather than using bars. That renders to the edge of the chart so if you scroll ahead its still visible. In that use case you would use 1 bars ago as the start anchor and 0 bars ago as the end anchor to point the ray to the right.
JesseNinjaTrader Customer Service
Comment
-
So after some test, I noticed that if paint a future backbrush with an index in the futurePHP Code:BackBrushes[-1] = backBrush;
Comment
-
Hello cutzpr,
As mentioned there is no support for using negative bars ago in NinjaScript so that is not something I could confirm. We don't have any guidelines on that topic and that is known to produce problems by using the barsago field in unsupported ways.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ETFVoyageur, Today, 05:26 AM
|
0 responses
5 views
0 likes
|
Last Post
by ETFVoyageur
Today, 05:26 AM
|
||
Started by thegeniuswavebyt, Today, 03:40 AM
|
1 response
10 views
0 likes
|
Last Post
by marcus2300
Today, 05:12 AM
|
||
Started by wuannetraam, Yesterday, 07:43 AM
|
2 responses
28 views
0 likes
|
Last Post
by wuannetraam
Today, 03:57 AM
|
||
Started by hsammons87, Yesterday, 05:21 PM
|
1 response
17 views
0 likes
|
Last Post
by peter629
Today, 03:51 AM
|
||
Started by David Hill, Today, 02:57 AM
|
0 responses
22 views
0 likes
|
Last Post
by David Hill
Today, 02:57 AM
|
Comment