.

TS ELD to MQL4 / Donchian Channel

#1
Can anyone please convert the below TS .eld file to MQL4:
//==========================================
// ! EURUSD Donchian C Channel Yellow
//==========================================
// Donchian Channel based on "Close" prices
// The upper and lower channels are plotted only when Value4 is LESS THAN the ChannelWidth input

Inputs: Length(7),
ShowAvg( false),
ChannelWidth(0.0006); // Maximum channel width to plot
//--------------------------------------------
Value1 = Highest(C,Length); // Highest Close over length bars
Value2 = Lowest(C,Length); // Lowest Close over length bars
Value3 = ((Value1 + Value2) / 2);
Value4 = (Value1 - Value2);
//---------------------------------------------
If Value4 < ChannelWidth then
Begin
Plot1(Value1, "DonchianHi", Yellow );
Alert("EXIT");
end
Else
Noplot(1);

If Value4 < ChannelWidth then
Begin
Plot2(Value2, "DonchianLo", Yellow );
Alert("EXIT");
end
Else
Noplot(2);


Who is online

Users browsing this forum: No registered users and 4 guests