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)
Hello, I worked with tradestation (easy language) and now trying to write one of indicators in ToS, but it goes very hard for me, so i need some help.
What I need:
I need to save my variable "X" at the end of day and during next day "new_var" = X*(1+a-b) and at the end of the day X=new_var. But I have problems, because i can't write like in EL:
def new_var;
def x;
new_var=X*(1+a-b);
X=new_var;
or smth like that, that's not working =(
Can you help answer these questions from other members on NexusFi?
Hi, if you're using the daily time frame, then you can have TOS reference the previous day's bars and defined variables by [n] where "n" is number of days back.
So it could be:
def new_var;
def x;
new_var = x[1]+1;
x = new_var;
plot xgraph = x;
Which would draw a sloped line on the daily time chart space.
I'm using intraday time frame, your answer helped me, but I still have no idea, how I can save my vars at the end of day. Is there smth like "If T=1630 then blah-blah"? =)