The event in [1] is when 2 ema's cross.
I have successfully referenced indicator "values" between MTF bars, but can't seem to reference events.
My thought now is that I need to do something like this: (i left out non-relavent parts of the code for clarity)
if(BarsInProgress==1 && Crossover(EMA1,EMA2,1))
{
myVariable = 1;
}
else
{
myVariable =0;
}
if(BarsinProgress==0)
{
if(myVariable = 1)
{
ExitLong
}
}
Is this the best way to do this? Or am I simply missing the right Syntax to reference the event directly within the code in "BarsInProgress==0"? I am not sure the 2 Bars are sync'd so that the crossover event that occurred at the close of the last bar in [1] is still valid when the update happens in [0].
I may have simply missed an example of an event vs. an indicator in the documentation.
THX.

Comment