@Sdrazisha , it was nice that you added pictures to your post, but for anyone to really be able to help, we need to be able to read/test your code. To that end, copy and paste your code into CODE BLOCKS so we can then copy it out of the forum.
For reference, here are some useful links:
Search the forum
It is good idea to search the forum before asking same questions over and over. To search the forum just use magnifying glass icon in the upper right corner
[image]
Also it is good idea to use Google and add +site:amibroker.com to your search term to limit the output to content of amibroker.com web site. Doing so will include results from Knowledge Base and Users' Guide
Enter the AFL code properly
It is of utmost importance as improperly formatted code results in syntax err…
Programming in AmiBroker Formula Language (AFL) is not that different from programming in any other language. If you are looking for general introduction to programming any language tutorial would do because programming is not about the syntax but about general concepts such as variables, functions, loops, etc.
AmiBroker Formula Language is syntactically similar to plain old C and JScript but easier to use. It also has lots of functions that are trading related but general concepts are common i…
Continuing the discussion from How do I learn AFL? :
Many new users with zero programming experience struggle when their formula works incorrectly. Here are few hints that everyone should use to make finding errors easier.
First of all: you have to get insight into what the formula is actually doing, not what you think it does.
Typically new user has no idea what is happening inside. Pretty often you make an assumption that things work one way but in fact they work differently. Do not assume t…
When you post your code in a usable fashion, you will be much more likely to get usable assistance.
3 Likes