I have found out this script some time ago. In fact it is not my code (just have modified a little) and I don't know the author (couldn't find). So now I would like to share with the community, maybe somebody would have some idea how to make it better. The script itself is modified volatility oscillator (like ATR) based on volume, making a deal at the moment of price change. To recognize the current trend I have add simple function just to compare the current price with the N bars before, because sometimes in moments of high volatility there may be wrong signals.