Forum

Bar calculation and iCustom sanity check

Hello, I have been searching for an answer for my question all over the web, but I didn't have any luck. I have a simple indicator that takes an indicator called by iCustom and displays if it is in uptrend or downtrend in a 0/1 histogram. The code works well when placed on the chart and when I

Get previous two values from another indicator

Hello, I have been struggling with this problem for too long now. How do I properly get previous two values of an indicator? The code I came up with is below, but it goes out of range on the last candle, and I can't figure it out why