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)
I have coded a very basic NinjaTrader indicator but I am having some trouble trying to work out how I could move forward with it.
At the moment the indicator draws lines from the open (using the NinjaTrader CurrentDayOHL indicator). It draws horizontal lines 50 and 100 ticks above and below the open price.
What I would like to do is ONLY display the horizontal line that is nearest to the current price as I have found that by displaying the 4 lines mentioned above or any more for that matter it squashes the chart considerably.
So in effect if if the price was still close to the open then I would only want to display two of the horizontal lines the 50 ticks above the open and 50 ticks below the open ... or ... if the price was above the open by say 60 ticks then I would only like to display the horizontal line 100 ticks above the open and 50 ticks below the open.
Also if the price has already been to one of the aforementioned prices then I don't want to display that level again during the session.
I would really, really appreciate the help.
Thanks in advance,
suprsnipes
P.S. I have attached the .zip file
Can you help answer these questions from other members on NexusFi?
As suggested I should place this in onbarupdate() but does it go underneath the existing code? I'm not quite sure what to do here.
No problem with the suggestion to add AutoScale to false option within the script Big Mike but as per above I am stuck with achieving what I was originally after. If any of you NinjaScript Wizards have some spare time I would really appreciate it if you could perhaps point me in the right direction here.