futures io is the largest futures trading community on the planet, with over 90,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.

someone might be able to help you, if you could elaborate what you are trying to accomplish.

A correct answer to your question (although obviously not what you want) would be:

Code

Date <> Date

This would be the code re-written, without using next bar - taking your question literally.

As another person usually doesn't know your intend, it's extremely helpful to provide as much context and explanations as possible - what does the code do now, what do you want it to do instead etc.. If you want people being able to help you, it can also make sense to state the platform you want the help for and post into the correct section of the forum.
Just to make it clear, I am trying to help and the above is meant as that and no criticism.

When you apply the following code (in a signal) to an intraday chart, you will see why the two are different:

Date <> Date[1] will become true on the first bar of the new day, while Date next bar <> Date is true on the last bar of the current day already (as at that time the date of the NEXT BAR is already the next date).

One approach might be to change the codes that are affected by that, so they give you the same results when using Date <> Date[1].

Date <> Date[1] will become true on the first bar of the new day, while Date next bar <> Date is true on the last bar of the current day already (as at that time the date of the NEXT BAR is already the next date).

One approach might be to change the codes that are affected by that, so they give you the same results when using Date <> Date[1].

Regards,

ABCTG

ABCTG,

Thanks for the tips. I am currently using Multichart and I had to change your code.

what exactly do you mean with "still referencing the 30M logic" exactly? What should it apply to and what not?

If you are running your strategy without intrabar order generation on a 30 min chart, you have access to the values at the end of that 30 min bar. This is something you can't overcome, unless you are willing to act on values that might be different than they would be at the end of the bar. Take the average for example: Over the course of the bar it will have different values. Your current signal acts on the end of bar values for that average, but if you are trying to act on the average's values already mid bar for example, the results will likely be different than in your original strategy (simply because you are looking at different data).

You also might want to do @BigMike a favor and not post the same questions multiple times across different threads.

what exactly do you mean with "still referencing the 30M logic" exactly? What should it apply to and what not?

Regards,

ABCTG

ABCTG,

I did not want to scare readers by posting a large amount of code so I tried to keep it as simple as possible. It backed fire on me. Anyhow, you have helped me out a lot and I think that I got a temporary solution. Before I was attaching the code to the 30M chart, using the code below I am attaching the code to 1M chart. This is what I mean by using 1M chart but referencing 30M chart.

Data1 - 1M chart
Data2 - 30M chart

Code

Variables: average_20C(0, data(2));
if Time >= 1500 OR ATR_check = FALSE then
Begin
if Time >= 1500 then
Begin
average_20C = Average (CLOSE, 20)of data(2);
End ;
prev_ATR_check = ATR_check ;
End ;

you are welcome. You might want to specify that the average should use the Data 2 Close, although for the closing price this might not even matter (for High and Low for example it will, though, as these will be different).