I am using the MRO function to check for a condition of an indicator. Here is a brief outline of the code.
if ((FlagFT[0] == 1) || ((MRO(delegate {return FlagFT[0] == 1;}, 1, 10) > 0 && MRO(delegate {return FlagFT[0] == 1;}, 1, 10) <= 5)))
{
if ((FlagStochastics[0] == 1))
{
EnterLong (1,"FTlong");
}
}
FlagFT and Flagstochastics are a dataseries of 1's and 0's.
So what I want to do is check if the condition is present in the last 5 bars of one indicator and if it is at the same time another condition (Flagstochastics) is true, then enter a trade on the first bar that the conditions are true at the same time
What is occuring:
The order entry is happening after the last bar of the MRO condition which is, in the example above, 5 bars after the desired entry point.
I have played with the MRO function a bit without much success. Is this a fault or am I using it wrong?
Steve

Comment