futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:

We are here to help. Just let us know what you need.

We work extremely hard to keep things positive in our community.

We do not tolerate rude behavior, trolling, or vendors advertising in posts.

We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.

We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple.

Thanks now the code seems to work better and for todays high everything seems ok,
but for todays low the value is 0.
From printlog:
Date 1160902.00 IntradayHigh 2186.75 Time 1620.00 Intradaylow 0.00 Time 0.00

To ensure that there is no error in data did I save the data and made a quality ckeck in excel and the lowest value is 2164.25.

For some reason does todayshigh work fine but not todays low.
Very confusing, has Tradestation any errorhandling or memory problems causing that the variables returns a 0 or what can be the problem?

it's more likely coming either from the code or chart setup and not from a TS error or memory problem. Although the latter is a possibility I'd suggest to check out the code and setup first.
What is the exact code you used for your testing, including the print commands?

What is the exact chart setting you have been using, including interval and days back (maybe post a screenshot of the symbol settings as shown under format symbol). Is there more than one data stream on the chart? Basically provide all information that one would need to reproduce what you are seeing on your end.

thanks for the screenshot. I have added plot statements to the code and tested it. The problem is

Code

if Date <> Date[1] and BarStatus( Datanum ) = 2 then

won't work as Datanum returns a value of 0.

You will have to set this to the datastream you apply the study to (1 in your case) and the code will work fine.

This is a bit of a pitfall here, as the compiler shouldn't compile the code as DataNum is neither a reserved word nor a variable in your case, but TS uses DataNum as placeholder in the help file. So maybe something got mixed up.

From the TS help:

BarStatus(DataNum)

DataNum is a numeric expression representing the data stream that is being evaluated. 1 refers to Data1, 2 to Data2 and so on. DataNum can be between 1 and 50, inclusive.