{
MessageBox.Show("A TRO HOOK may be imminent.",
"TRO Hook",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
feWarn = true;
}
else if(!feWarn && finalExitMode == "CCI" && (TDirection == "L" ? (CCI(cCIPeriods)[0] < lineValue && CCI(cCIPeriods)[1] > lineValue) : (CCI(cCIPeriods)[0] > -lineValue && CCI(cCIPeriods)[1] < -lineValue)))
{
MessageBox.Show("A CCI LINE CROSS may be imminent.",
"CCI Line Cross",
MessageBoxButtons.OK,
MessageBoxIcon.Information);
feWarn = true;
}
I have the above code in an indicator to alert when a tracked trade is becoming precarious. feWarn is set to false in [Variables] and reset to false in EndTrade() (not shown) which is called when a trade goes flat.
using System.Windows.Forms;
is set in [declarations].
For whatever reason, the message box appears multiple times (still scratching head on that one), and NT crashes to the desktop w/o warning. The Trace file shows nothing and the the log tab, of course, is reset.
Comment