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 rt61968, 02-17-2018, 05:24 PM
|
3 responses
2,733 views
0 likes
|
Last Post
by MasterEtrad3
Today, 08:12 PM
|
||
Started by nuobo, Today, 07:43 PM
|
0 responses
1 view
0 likes
|
Last Post
by nuobo
Today, 07:43 PM
|
||
Started by ETFVoyageur, Today, 02:04 PM
|
3 responses
21 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:04 PM
|
||
Started by cre8able, Today, 06:18 PM
|
0 responses
6 views
0 likes
|
Last Post
by cre8able
Today, 06:18 PM
|
||
Started by ETFVoyageur, Today, 06:05 PM
|
0 responses
7 views
0 likes
|
Last Post
by ETFVoyageur
Today, 06:05 PM
|
Comment