Professional Documents
Culture Documents
// Version 1.5
Express Commodity_Selection
Vars
series line, swingline, senti(50);
series res, res1, res2, res3, res4;
numeric pdm, mdm, Minus_DI, Plus_DI, Dirmov_DX;
series adx;
numeric k, tmp, tmp1, sm, atr, adxr;
input $period (1,100,14);
input $margin (1,10000,2500);
input $commission (1,100,25);
input $point (1,1000,100);
input $spanLeft(1,10,1);
input $spanRight(1,10,1);
input $MessageBox("No;Yes",0);
input $PlaySound("No;Yes",0);
input $SendEmail("No;Yes",0);
//-------function TrueRange----------------
series r;
numeric truehigh, truelow;
Calculation
if IsFirstBar() then
begin
CalculateAtEveryTick(false);
SetYscaleFormat(GetPriceFormat());
end
//------------function TrueRange------------
if CurrentBarIndex() = 0 then
r = high - low;
if CurrentBarIndex() >= 1 then
begin
truehigh = close[1];
if truehigh < high then
truehigh = high;
truelow = close[1];
if truelow > low then
truelow = low;
r = truehigh - truelow;
end
//------------------------------------------
swingline = line[1];
interpretation
begin
sentiment = senti;
end