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)
The bars ago function does not work in NT indicators. Only NT Strategies. I verified this with NT.
So I'm looking for another way to model a lookback (or a displacement, as its called in the indicator window).
So I want to do an alternative for the bars ago function... Close[0] - Close[x] I'll be working it into something more complex, but I can go from here if any kind souls want to help my stump!
Some days I can't see the forest for the trees and today is one of those days, sorry.
In this lookback, are you trying to go back X number of bars to see something or are you trying to scan for a value that may have occurred over the last x bars? Hey if you have strategy code that does what you need or if you had a picture of your needs I may be able to see something to help with.
Be yourself; everyone else is already taken. Oscar Wilde
I'm just looking for an alternate to bars ago, besides using close[3] for example. The bars ago function does NOT work in indicators. I don't want a strategy, just an indicator.
Maybe I'm overthinking this. Lets use your example as an example, Close[0] - Close[20]
if you create a variable to put the results in, will that not meet your needs?
IE:
double diff = Close[0] - Close[20] ;
So the above code statement declares a variable called "diff" that is a double type. Next (on the other side of equals) the difference between Close[0] and Close[20] is put into diff. The ";" ends the C# statement.
Is that what you want?
Be yourself; everyone else is already taken. Oscar Wilde