I'm looking for some reassurance from people that have been using AFL for a while.
I'm finding it difficult to get simple pieces of code to execute correctly and the User's Guide is providing examples that make no sense. Perhaps it is the use of arrays that is throwing me off.
For example:
1. if( Status( "redrawaction" ) ==1 ) -- from page 1068 of guide
2. if( Status( âfirstbarinrange" ) ==1 )
According to the User's Guide, Status("statuscode") returns an array and both "redrawaction" and "firstbarinrange" are valid status codes. The syntax checker says the first example is okay and the second is not. I can understand why an array is not acceptable in an IF statement. What I don't understand is why the first example is okay.
This is but one of many confusing aspects of AmiBroker. I ran a back test and it said that my short positions produced losses. Yet, when I look at the entry and exit prices they are clearly profitable. Essentially, AB reversed the entry and exit prices in it's profit calculations.
I really would like AmiBroker to work and I fully admit that I probably am making mistakes as a newbie. But some reassurance that this can all be resolved if I just stick with it would be appreciated. And perhaps some words of wisdom on how to adjust to the AFL paradigm.
For background I have coded in over two dozen languages and haven't had this much problem understanding what is going on since I was learning Assembler (one of my first languages). Normally, I can just grab a user guide and start coding.
It should be noted that AmiBroker Support has been very responsive. However, their explanations often leave me still not knowing the answer to my question. And yes I did ask about the example above, but their answer made no sense to me. They said the first example doesn't return an array and the second one does, which happens to be contrary to what the User Guide says.
I'm finding it difficult to get simple pieces of code to execute correctly and the User's Guide is providing examples that make no sense. Perhaps it is the use of arrays that is throwing me off.
For example:
1. if( Status( "redrawaction" ) ==1 ) -- from page 1068 of guide
2. if( Status( âfirstbarinrange" ) ==1 )
According to the User's Guide, Status("statuscode") returns an array and both "redrawaction" and "firstbarinrange" are valid status codes. The syntax checker says the first example is okay and the second is not. I can understand why an array is not acceptable in an IF statement. What I don't understand is why the first example is okay.
This is but one of many confusing aspects of AmiBroker. I ran a back test and it said that my short positions produced losses. Yet, when I look at the entry and exit prices they are clearly profitable. Essentially, AB reversed the entry and exit prices in it's profit calculations.
I really would like AmiBroker to work and I fully admit that I probably am making mistakes as a newbie. But some reassurance that this can all be resolved if I just stick with it would be appreciated. And perhaps some words of wisdom on how to adjust to the AFL paradigm.
For background I have coded in over two dozen languages and haven't had this much problem understanding what is going on since I was learning Assembler (one of my first languages). Normally, I can just grab a user guide and start coding.
It should be noted that AmiBroker Support has been very responsive. However, their explanations often leave me still not knowing the answer to my question. And yes I did ask about the example above, but their answer made no sense to me. They said the first example doesn't return an array and the second one does, which happens to be contrary to what the User Guide says.