I've recently discovered this command but couldn't find any information about it in the support section so I'm starting this thread because I'd like to use it in my strategy.
Here's my question to the wider community:
When enabling the extremely basic strategy posted below, the chart appears on the screen when the condition is met and disappears when it is not, exactly as expected.
if(Close[0]>Open[0])
{
ChartControl.ParentForm.Show();
}
if(Close[0]<=Open[0])
{
ChartControl.ParentForm.Hide();
}
But, when I integrate the ChartControl.ParentForm.Show() command into my automated strategy, it doesn't work anymore. Any idea why that might be?
Thanks a lot.
Here's the code snippet that draws an arrow under the candle that generated the signal, plays an alert but fails to bring the chart on the screen. (My entry criteria clearly aren't the problem as the arrow is drawn and the alert is played).
if(MyCriteriaHere)
{
DrawArrowUp("GreenArrowLong" + CurrentBar, false, 0, Low[0]- 4*(TickSize), Color.Lime);
PlaySound("Alert1.wav");
ChartControl.ParentForm.Show();
}
Comment