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)
(1) For the first bar of your chart, which is CurrentBar = 0, you cannot access Close[1] or Open[1], because it does not exist. Therefore, you need insert a line in the beginning of OnBarUpdate()
(2) There are bars that have a zero range when high = low. In that case you will run into a division by zero problem, which you need to exclude.
(3) Rather than using the Plot method to place a dot above or below the current bar, I would use the NinjaScript method DrawDot(), which allows you draw a margin above the high or below the low. If you use the Plot method, you may get unwanted dots, even if you have set no values to the plot.
Thank you so much for this quick reply.
I am now doing the CurrentBar check, making sure I don't divide by zero, and am using DrawDot.
It is now working like champ!
Also discovered where log is! Guess I was pretty much flying blind
Should of come around sooner and saved a few hours
Thank you so much for this quick reply.
I am now doing the CurrentBar check, making sure I don't divide by zero, and am using DrawDot.
It is now working like champ!
Also discovered where log is! Guess I was pretty much flying blind
Should of come around sooner and saved a few hours
thanks again.
Milford
use plot but if you dont want to see it you can plot Plot0.Reset.