Keep track of the number of hits, fails, and hit ratio, in any given context.

The number of hits, fails, and their ratios are fundamental metrics.

## Hits Hits counts the number of positions that closed with a positive profit loss, in the context of the parent node.

In the context of the quoted asset or the base asset, hits are calculated relative to the asset in question. That is, if the base asset profit loss is positive, then a hit is counted for the base asset.

However, when the context of the asset is not specified—such as under the statistics node—then hits are calculated in a consolidated manner, converting the respective balances to perform the calculations.

## Fails Fails counts the number of positions that closed with a negative profit loss, in the context of the parent node.

## Hit Ratio Hit ratio is the percentage of positions that closed with a positive profit loss, in the context of the parent node.

Hit ratio results from multiplying the number of hits by 100 and dividing it by the number of positions: `hit ratio = hits * 100 / positions`.

## Hit Fail Hit fail states whether a transaction is successful or not, hit meaning it is successful and fail meaning it is not.

Superalgos marks positions and even entire episodes as hits or fails, by evaluating profit loss for the corresponding context. If profit loss is positive, then the position or episode is a hit. If profit loss is negative, it is a fail.