Didn't add full code as I think/thought the issue is with the variable assignment in the Ichimoku.
Here's pretty much the full code. This script works fine when the XAO is the code being charted (minus the WeekXAO specification that is).
When I try and add as a bar custom colour for any other stock, it seems to be ignoring the XAO specification and just uses the stock code being charted at the time.
There is an error on the second line of your script, where the XAO data function has not been wrapped by the ICHIMOKUCLOUD() function. This would prevent the results from displaying correctly.
TS=WeekXAO.ICHIMOKUCLOUD().TenkanLine;
Please try adjusting the second line to work the same as the other lines in your script.
In my attempts to rectify/debug, this was one thing I tried but of course in sending it to you, again it was incomplete.
If you are confirming my reference to XAO data on charts displaying other stock codes should work, then I can have a more detailed play.
My initial findings seemed to suggest it didn't work - as per supplied screen shots.
I'll do a more simpler test. I'm sure it works for simple functions like ROC and VOL etc but with my past experiences with the Ichimoku function, I was wary that the issue was there.
Thanks for your assistance yet again. In further testing, I found it does work and my error in getting different results with the more complicated formula I was using was as a result of using the charted stocks close price and not the XAO's :-)