Hi again,

As it often happens, I found the solution almost immediately after posting. And 
I think it's either a bug or undocumented feature of AmiBroker (I'm using 
v5.20). In the latter case I have no idea what the purpose might be...

In my code I do a lot of checking for Status("action") and Status("ActionEx"). 
This is mainly because I use one formula for backtesting in various modes and 
an indicator (equity curve). Most of the system code is in 

if(Status("action") == actionBacktest) {}

blocks.

I had a gut feeling that this had to do with my problem so I took a very basic 
bare bones system which does not check for "action", inserted a 

_TRACE("Action = " + WriteVal(Status("action"), 1.0) +
       ", ActionEx = " + WriteVal(Status("actionEx"), 1.0));

line in the code after the signals are processed, and repeated my test with 
"show arrows". Here's the debug output I get when I go for "show arrows for all 
raw signals" or "show arrows for actual trades":

[2984] Action = 0, ActionEx = 10
[2984] Action = 1, ActionEx = 1

OK, ActionEx == 10 is actionExAAShowArrows, as expected. But there's no such 
documented thing as action == 0! That's why my 

if(Status("action") == actionBacktest)

prevented the code (first pass) from executing when it was needed! I changed it 
to 

if((Status("action") == actionBacktest) OR (Status("action") == 0))

and no my trade arrows are showing happily again!

My personal opinion is that every "ActionEx", including the newly introduced 
ones, should be mapped to an existing, documented "action" for consistency. In 
this particular case it may be difficult to decide between 1 and 5, but still - 
any choice would be better than zero. It would be interesting to hear your 
opinion.

Thanks again for this amazingly helpful mailing list!  



--- In [email protected], "wml67" <y...@...> wrote:
>
> I'm developing a system and "show trading arrows" feature used to work for me 
> just fine at earlier stages in all its three varieties - raw signals, actual 
> trades, and current trade.
> 
> For a while I concentrated on other aspects and made a lot of changes to my 
> code without testing show arrows functionality. And now I discovered that 
> "show arrows for all raw signals" and "show arrows for actual trades" have 
> ceased to work - they show nothing at all... "show current trade arrows" 
> works just fine though...
> 
> Does anyone have any ideas by any chance? I'd hate to roll back the changes 
> trying to find the step that introduced the problem...
> 
> Many thanks for your help. This list is an amazing resource.
>


Reply via email to