Any side effect with AFL when storing negative values in array?

Normal price and volume data is always positive. So, I am wondering if there are side effects to take note when storing negative values in AFL arrays. For example, will PercentRank rank large negative values at the bottom?

Arrays by themselves don't care what values they hold. Certain functions however may assume positive price. Generally prices (OHLC fields) should be greater than zero. For example log charts (and log function) require positive values, backtester also wants prices to be positive. Answering your question: PercentRank works fine with negative data.
And if you are in doubt how given function works, why don't take advice given here: How do I debug my formula? and check yourself, using Exploration.

3 Likes