% difference between closing for two different dates

This is a follow up to my earlier post. I am wandering if I can program Amibroker to Calculate the % difference between two closing prices in the following format:
Symbol Date 1 Date 2 % diff

I am using ver 6.00.2 if that makes any difference. Thanks in advance.

@bolaakinpelu, it is best to keep all the follow up in the original thread (topic).

As to your Question... Can AmiBroker do it... YES.

Bigger Question... Can you program the AFL to do what you want?

Advice: TRY IT..

As a longer term member of the forum, you should spend more time Searching and Reading. You will see that the Questions that get the "best" responses are usually ones where the OP (Original Poster) has show the code that they are working with, and explain what they are trying to do.

When you show you are attempting it, lots of VERY knowledgeable members feel better about contributing.

When you are learning AFL, START simple.
Try using the "Ref (..)" function and see how it works.
Then take a look at the date functions, bar index, and bar number. Then possibly "ValueWhen".

Again, show what you are trying, and let us know what is not working the way you think it should.

3 Likes