I have several indicators that are set as Infinite for testing but will need to be set to TwoHundredFiftySix for trading to save on memory.
With infinite I can call indicator 1 from indicator 2 with no errors but it turns into a train wreck when set to TwoHundredFiftySix.
eg. Indicator 2 calls original Indicator 1
if (Indicator1bar[0] > 0)
bar 5 = bar 4;
bar 4 = bar 3;
bar 3 = bar 2;
bar 2 = bar 1;
bar 0 = Indicator1bar[0]
This works fine only in infinite and corrupts when using the last 256 bars. 256 bars would be enough in real time
Is there a simple method used to get the right data and would it need to be done I guess, more likely in the original Indicator 1 rather than Indicator 2
I assume that this is a common requirement but there is no explanation in the help pages and I can't find it in the forum, but I am sure it must have been discussed before.
Any example would be handy if it has come up before.
I am thinking maybe:
1. A different type of series in the original indicator
2. A new series for every bar from 1 to 5 in the original indicator (there could be about 5 to 10 bars within the 256 bars but more than that is some of the other indicators)
3. An Array in the original indicator
I have quite a few indicators to change so I would like to use the most simple and usual method
Comment