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)
Does anyone know how to map the precious close of a custom indicator onto the next session? I attempted a counting loop and that didn't give me what I needed. I tried to modifiy the existing study changing the locations of close(period = aggregationPeriod)[-1]) to my variable x, but it appears that TOS doesn't accept aggregation periods for a variable. I tried counting from open but that didn't work either. I also tried to store the last barnumber but TOS does not use sequential numbering.
Can someone help? thanks All I am trying to do is color the current days x indicator value on whether the indicator is above or below yesterday's x closing value
Can you help answer these questions from other members on NexusFi?
def x=if GetSymbol()==/ES then close("/DX") else double.nan;
#this line I use to this trigger the location of the close
def ValueClose=if (showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1])) then
double.NAN
else
#what do I put since I want to use the previous close value of x instead of actually
?
close("/DX",period = aggregationPeriod)[1]
what I would like to is color the x based on the previous close valce of x.
def x=if GetSymbol()==/ES then close("/DX") else double.nan;
#this line I use to this trigger the location of the close
def ValueClose=if (showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1])) then
double.NAN
else
#what do I put since I want to use the previous close value of x instead of actually
?
close("/DX",period = aggregationPeriod)[1]
what I would like to is color the x based on the previous close valce of x.
Okay, so, not to be rude, but this all seems unnecessarily complicated.
Let me try to understand what you're intentions are here.....
You're trying to do what exactly? Compare the current price of /DX versus yesterday's close?
And then plot that as a lower study on an /ES chart?