"int barsAgo = MRO(delegate {return Close[0] > Open[0];}, 1, 9);
if (barsAgo > -1)
I used this in the variables section:
int barsAgoUp = MRO(delegate {return HeikenAshi().HAClose[0] > HeikenAshi().HAOpen[0];}, 1, 4);
and also
int barsAgoDown = MRO(delegate {return HeikenAshi().HAClose[0] <= HeikenAshi().HAOpen[0];}, 1, 4);
In the On Bar Update section, I used:
if (barsAgoUp > -1) as part of the code for the long entry
and then
if (barsAgoDown > -1) as part of the code for the short entry
The error I am getting reads: An object reference is required for the non-static field...
Can anyone please help me with this?
Comment