If the If/Else still gives you the same result, try to move the Graph outside of all TimeFrame command. Thus, reset it to the fastest TF at the bottom of your program and then do the Graph again (after possible adjustment because of moving it out of the TF commands). You may be surprised on the results (yes, Graph s*cks).
Yeah I had tried that already, with some interesting results! It would do a sort of zig-zag pattern, where for one bar AdaptiveAverage was returning Close and the rest it was correct (or the other way around – I can’t remember).
You may try to use Print too (Print is decent, says me).
Thanks – didn’t know about Print actually! Also now I’ve found it in the docs I can see GRAPHONPRICE is also a thing which might be useful in some debugging scenarios…
Still no dice ? then try to “fit” the two TF’s within each other by different factors. Thus, change the 1 minute to 10 minutes and/or change the 10 second to 1 second or 20 seconds etc. You will start to learn what’s going on really and possibly may even come to the conclusion that your assumptions on how to use the PRT programming language must be adjusted a little (I am thinking of your real code and where this could fail, you working on the proof in the same direction – which is human).
I know where you’re coming from… I had also tried swapping those kind of things around too as I was digging into this issue. In general I tend to leave no stone unturned when I encounter unexpected issues such as this, and would only post to a forum / bug report when I’m very sure of what I’ve found. Most of the time I do figure out I’ve either done something silly or that there is a workaround that is easier to go with rather than bother other busy people on the internet. 🙃