You can now draw many of the NinjaTrader “Drawing Objects” in the future, i.e. in the empty area to the right of the current bar on a NinjaTrader chart, using no-code Quagensia N Edition Functions.
All no-code Quagensia N Edition Functions that draw objects on a NinjaTrader chart now allow you to enter negative numbers in their “Bars Ago” parameters to draw all or part of the shape “in the future” with the exception of the following no-code drawing functions that we determined did not work properly on live charts, in Market Replay, and/or in Strategy Analyzer backtests:
- Functions in the “Draw Something >> Colors” folder.
- Functions that start with “Draw Polygon” in the “Draw Something >> Large Shapes” folder.
- Functions that start with “Draw Path” in the “Draw Something >> Lines” folder.
- Functions in the “Draw Something >> Channels” folder.
Note that the word “folder” in the four items above is short for “folder in the context menu that opens when a location is clicked where the mentioned functions are allowed”.
An attempt to enter a negative number directly into a “Bars Ago” parameter of any of the functions listed in the exclusion list above will result in the Quagensia N Edition Strategy being invalid and will cause Quagensia N Edition to disallow you to generate the strategy’s code until you enter a number that is greater than or equal to 0 for the invalid “Bars Ago” parameter. Whereas entering a negative number directly into a “Bars Ago” parameter of any of the drawing functions not listed in the exclusion list above is allowed and will not result in a validation error that Quagensia N Edition requires you to fix before you can generate the strategy’s code.
Note that while you are free to use this feature of Quagensia N Edition by entering negative numbers in the “Bars Ago” parameters of no-code drawing functions that allow them, using a negative number as the value of one of the “Bars Ago” parameters of a no-code drawing function in Quagensia N Edition cannot be officially supported by Quagensia, Inc., because NinjaTrader, LLC does not officially support using negative numbers in the respective “Bars Ago” parameters of the respective NinjaScript functions that are used by the no-code Quagensia N Edition Functions. Here is what a scripting support employee at NinjaTrader, LLC emailed us in response to an email we sent them were we asked about using negative numbers in NinjaScript drawing functions (the bold and italic formatting in the quote below was not in the original email and was done by us at Quagensia, Inc.):
On time based bars with predictable intervals using a negative number generally works. When using a bar type that does not have a predictable interval like range, renko, tick, etc, the drawing objects will move in location when the chart is reloaded.
As this behavior is detrimental to some traders, using negative indexes is not supported by the NinjaTrader Support team.
Using unsupported code is your choice to use, though our team will not be able to assist with any undesired behavior as a result.
If you are finding using the unsupported code works consistently for your use case it would be your choice to proceed.