//Low swing
if(DmREIplusRSISmoothSlow(BarsArray[0],2,7,2)[0] > DmREIplusRSISmoothSlow(BarsArray[0],2,7,2)[1]
&& DmREIplusRSISmoothSlow(BarsArray[0],2,7,2)[1] < DmREIplusRSISmoothSlow(BarsArray[0],2,7,2)[2])
{
DrawTriangleUp("rplusrsmooth low swing" + CurrentBar, true, 1, Low[1] + -8 * TickSize, Color.Yellow);
Print(Time[0].ToString());
Print(DmREIplusRSISmoothSlow(BarsArray[0],2,7,2)[1]);
}
Typical code depicting the present bar higher then previous bar and previous bar lower then 2 bars ago.
I was getting incorrect results in the way of swings indicated when there was no swing, ie, the oscillator did not conform to the code. After much painstaking work I have proved that if you have multiple bars objects in a strategy where the base object [0] is the 3000 tick and you add a 10 minute bars object [1], you have to stipulate BarsArray[0] for any method or condition that uses the base bars object.
If I don't stipulate BarsArray[0], the software whacks out and prints signals in error.
This is contrary to the help for Multi-Time frame examples where it shows using the base bars object and another BarsArray in a statement. The help does not show using BarsArray[0] in the formula when referencing the base bars object.
Anyhow, finally figured this out and I don't know if NT developers think this is a bug or not but wanted to put this out there.
The above example code is what fixes it, remove BarsArray[0] and false signals occur. You can reproduce this probably with any oscillator on a tick chart and adding just one BarsArray. You don't even have to use the second BarsArray in a condition or formula, it's mere presence causes the problem.
NT7 64-bit 7.0.1000.27 version
Comment