What is this number?

Friends, what are these numbers alongside the "long" and "short" names?


And its weird because the time of entry is exactly the same as the time of exit. Its like its not simulating.

Can anyone help me?

I already put INDIVIDUAL BACKTEST, but there are some symbols where this happens.


@GustavTrader if you look at the Equity() function documentation, in the Comments section, you'll see that AmiBroker uses some numeric codes to indicate specific "sell/cover" conditions:

Depending on kind of the stop various values are written back to sell/cover array to enable you to distinguish if a given signal was generated by regular rule or by stop.

1 - regular exit
2 - max. loss
3 - profit target
4 - trailing
5 - n-bar stop
6 - ruin stop
7 - * reserved
8 - * reserved
9 - * reserved

(The values above 9, up to 127, at present are considered, "custom" exit values.)

While these 'exit codes' are usually triggered by the ApplyStop() function, it is also possible to assign them explicitly in your code (mainly when a system uses a "loop" logic similar to the one coded in this KB example).

So, I suspect that in your formula the numbers you see are (unintentionally) assigned to the Sell variable instead of the more common 1 (one) value.

Please, see also this other KB article.


Thanks for the tips.

But whats funny is that it happens only with certain symbols.

See this WDOZ18. The marked trade, ok?


It gave an error and a loss.

Now I will backtest the WDO2. This is just a merge of WDOX18 and WDOZ18 (theyre monthly future dollar contracts here in my country). Its the same data, the same code..


See the same trade without any problem?