A Question about info 1001

I upgrade my Amibroker to newest version 6.43.1

i try to write a Order afl ..

if ((LastValue(BuyCondi1) == 1) AND (BuyPosHold == 0)) {

it give me a info 1001 for lastvalue function

why ??

1 Like

As documented here the '1001 Info' message is related to a "look into the future".

So I suggest you double check the rules that generate your 'BuyCond1' to see what is causing the above message.

1 Like

Info 1001 message is new INFORMATIONAL message and it is described in the Read me that says:

AFL Editor: added inline "Info" messages that show which lines/functions cause looking into the future, can be turned off via Prefs/Debugger or via Tools->Options menu in AFL Editor

INFORMATIONAL messages are ... for your information, so you are aware of possibly not-so-obvious effects of your code. It does not indicate an error. It is not blocking, or anything and it only appears in the Editor when you verify formula.

This is a feature that is meant as a tool to easily identify which parts of the code look into the future. Note that looking into the future may or may not be intentional. For example, non-system code that is NOT meant to be backtested is OK with that. However using forward-looking calls in trading systems inevitably leads to creating "too good to be true" system in most cases.