Thanks for your reply.
I would recommend that you make a variable (int) to store the CurrentBar number (for the BarsInProgress the cross happens over). In my example I'll call this crossBar.
Then to get the bars ago value for this bar on a later bar use CurrentBar - crossBar.
For example, to see the Close of the crossBar:
if (CrossAbove(Close, SMA(19))
{
crossBar = CurrentBar;
}
Then later:
Print(Close[CurrentBar-crossBar].ToString());
Please let me know if this does not resolve your inquiry.
Comment