Hello,
In the function "MRO(test,len,1)", a constant is usually assigned to “Len” by users. But if I don't care whether the test would be true in the pre-set bars, I wish to assign barnumer to Len. But an error ocurs because of the setting(restriction) of MaxBarsBack. For instance,
value1=Average(c,10);
value2=Average(c,30);
if value1 cross over value2 then buy next bar at market;
if value1 cross under value2 then sell next bar at market;
value3=mro(value1 cross over value2,barnumber,1 );// the test may be any conditions
However, I noticed that some functions, such as barsinceentry are not retricted by MaxBarsBack. Is there any similar but correct expression with MRO(test,barnumber,1)?
Many thanks!
the parameter "Len" of MRO()[SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: the parameter "Len" of MRO()[SOLVED]
Hello Stone,
There is no way to do that. If you use barnumer as Len input for this function-your study will be in a constant loop, searching for a maxbasback value.
There is no way to do that. If you use barnumer as Len input for this function-your study will be in a constant loop, searching for a maxbasback value.