I have an application for a nested SetScale but cannot seem to get it to work. Here is a simple example which does not work but gives the flavor of what I'm trying to do.
CODE:
Please log in to see this code.
The input sample rate is 1m. The 30m is nested inside the 3m. As an example I try to synchronize the 30m to 3m and create summed series r3x and then come out of the 3m nest and finally plot or whatever in the 1m timeframe. One possible solution is to treat the 30m and 3m separately, synchronize to 1m and then add. Although this is possible in this simple example, my actual application is far more complex and is only feasible in the nested version.
Any help or suggestions are appreciated.
Size:
Color:
SetScale always operates on the chart's base time scale/interval. There is no such thing as "nested SetScale". What's wrong with the "possible solution" and why wouldn't it work for your complex application?
Size:
Color:
Cone,
Thanks very much for the reply. Ok, SetScale is not written to allow nesting.
In brief, I am combining code that has been tested and developed in different time frames, more than two. Flipping between a few different charts is possible but clumsy for interpretation.
I am reluctant to rewrite the code in any significant way because the inserts involves a thousand plus lines, a few thousand when all put together. In part, I am being lazy, but also know how easy it is to make mistakes rewriting the code to scale for the intermediate time frame. In any case I found a work around that minimizes the rewrite and will proceed.
There are as many ways to trade profitably as there are traders. For myself, I find more than two time frames a necessity. Smarter people than myself can probably do it with one or two.
Thanks again for the reply.
Size:
Color:
QUOTE:
Flipping between a few different charts is possible but clumsy
The idea is Synchronize() all the indicators created in higher time frames to the base chart; then there's only one chart to look at with all the indicators. Two, three, or more time frames isn't a problem, and it's not clumsy.
Size:
Color: