I'm trying to create a strategy utilizing values from several different indicators. Basically, I go through and check whether or not my indicators meet certain conditions. For the most part, the ninjascript strategy wizard works just fine for this. I don't really have to venture into the code at all.
HOWEVER, I can't seem to check conditions when it comes to colors drawn by an indicator. My problems come with Heikin-Ashi Candlestick Oscillator and Heikin-Ashi. I want to check if the color of a bar from Heikin-Ashi in one lookback period matches the color of HACO from another lookback period. But I'm unsure how I go about that. Setting them equal didn't cut it.
I looked through the indicator code. For instance, HACO has a binary value "Result" that is positive when in an uptrend. But accessing this through my strategy with (HACO(9, 9).Result[0] == 1) DOESN'T work/trigger.
How can I access variables from an indicator in my strategy? Example code testing what color a Heikin-Ashi bar is would help big time.
Thanks for your help!

Comment