The first thing I see is to better insert a prototype function on top of the script and to move the ChannelSwing function to the bottom/below the run function.

void ChannelSwing();


When you can plot the Dot1High values in the ChannelSwing function then I would use the printf function to output the Dot11High[1] and Dot11High[0] values to the Zorro window.


At first sight I don't know if this line is correct:

vars Dot11High = series((Close[0]+High[0]+Low[0])/3*2-Low[0]);

I think it should be:

vars Dot11High = series((Close+High+Low)/3*2-Low);


Or you can define the Dot vars directly:

var Dot11High0 = (Close[0]+High[0]+Low[0])/3*2-Low[0];
var Dot11High1 = (Close[1]+High[1]+Low[1])/3*2-Low[1];

and use them accordingly.


But it also could be that I just wrote totally crap cause I have a headache this morning... :-(


see you