NeedForTrade Documentation

BarsSinceExit Class

Lets get bars since exit of required position.


BarsSinceExit members:


    // Properties
    int this[int positionAgo] // returns bars since entry of positionAgo entry

    // positionAgo is counted as follows: 
    // BarsSinceExit[0] - bars since last exit, 
    // BarsSinceExit[1] - bars since previous exit.

BarsSinceExit[positionAgo] returns 0 there is no entry with specified positionAgo index.

Example: bars_since_exit = BarsSinceExit[0];