i have a problem with donchian breakout alert.
I want to have a alert which screens the instruments in my market analyzer for positions which breakout/touch the upper/lower donchian channel lines.
Since i don't find any solution to this problem i tried to code something in the strategy wizard.
This code should set an alert if the upper donchian channel line was touched.
My code looks like this:
{
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (Close[0] >= DonchianChannel(20).Upper[0])
{
Alert("MyAlert820", Priority.High, "test", "", 0, Color.White, Color.Black);
}
...and it doesn't work.
Best solution would be to set a different color for the position in the market analyzer if the position was touch the upper/lower donchian channel line.(20 days and 20 weeks channel)
Is this possible?
Thanks Chris
Comment