Welcome to NexusFi: the best trading community on the planet, with over 200,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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am new to coding in NinjaTrader. I have done some coding in EasyLanguage, AmiBroker and Python, but I'm just a trial and error guy, not a 'proper' coder.
As a first foray into Ninja, I am trying to draw a dot beneath bars based on a condition being true.
if I make my condition as simple as possible, like this:
-- the dots display correctly.
But, if I try to refer to previous bars, like this:
-- the code does not work. So, I assume it is the condition itself which I am getting wrong.
Can anybody explain why this change would stop the code working, and how I would correctly refer to previous bars?
Any help appreciated.
Here's the rest of the code.
Can you help answer these questions from other members on NexusFi?
What do you mean "it does not work"? What exactly do you do and then what happens?
Is this for a strategy or an indicator?
Have you checked the "Log" tab in the "Control Center" for any runtime error messages? If so what do they say?