/*[[ Name := PriceChannel Author := Renato Fiche Junior. Link := http://www.equipeforex.com Separate Window := No First Color := Red First Draw Type := Line Use Second Data := Yes Second Color := Red Second Draw Type := Line ]]*/ Inputs: ChannelPeriod (60); Vars: i (0), j (0); SetLoopCount(0); i = (Bars - ChannelPeriod - 1); While (i >= 0) { j = (i - 1 + ChannelPeriod); SetIndexValue(i, High[Highest(MODE_HIGH, j, ChannelPeriod)]); SetIndexValue2(i, Low[Lowest(MODE_LOW, j, ChannelPeriod)]); i--; };