Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Using Draw Methods to Plot to the Future Part of the Chart
I have a few projective approaches I'd like to test, projective in the way Fibonacci & Gann techniques are. They attempt to identify time & price points in the future that are of interest. The NinjaScript OnBarUpdate() method seems to prohibit programmatically drawing objects or plotting indicators to the future part of the chart, of whatever bar is being currently calculated. One can manually place rectangles and ellipses anywhere one desires, including the future area of the chart. Is there a way to programmatically place drawing objects to the future side (to the right) of whatever bar is being calculated, including the bar being created "now"?
I have seen some stuff on overriding the plot() method. Can that be used to programmatically draw the draw object methods like DrawRectangle(), DrawEllipse() on the future side of the chart, or does this only work for price-derivative indicators like MACD or RSI? And, does that require translating back and forth between time/price and X/Y coordinates?
Can the draw object methods themselves be overridden, so that they can take negative values for their x-axis/bars back values? They would then plot to the future. I prefer to stay with draw object methods if at all possible due to the simplicity of the arguments that they take, prices, numbers of bars, etc.
Thanks,
Tempo
Can you help answer these questions from other members on NexusFi?
I have at least in one case used a DrawText() method and entered a negative value for the BarsAgo parameter. This worked as the text was plotted to the right of the current bar.
Wow, Fat Tails,
That's the first time I've heard of that working. I have tried it with a rectangle before, but it did not work at the time. What version and build were you on? Tomorrow I will have time to code a test. If it works on NT7 (which is new to me) I will be thrilled, really.
Thanks for your quick reply,
Tempo
P.S. Confirmation or thoughts from others is welcome, too.
I have used it in that Relative Volume indicator. It plots the info at position -1 to the right of the last bar of the histogram.
You can check the code.