[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

questions regarding print files with an ela



PureBytes Links

Trading Reference Links

I have a simple Ela posted below and not all the commodities are reporting
to a file .. called dynamic..I checked the commodity numbers and even tried
the day only as well as globex....can someone direct me in what is wrong
here.. thanks..

Andy Abraham



inputs:ceil(60), Flr(20);
vars:x(0),y(0),ZDelta(0),Vlty(0),vara(0),
varb(0),oldvara(0),Ext(0);
y=x;
x=Stddev(close,30);
ZDelta=(x-y)/x;
if CurrentBar=1 then vara=20;
Oldvara=vara;
vara=oldvara*(1+ZDelta);
vara=MaxList(vara,Flr);
vara=MinList(vara,ceil);
varb=vara*0.5;
Buy tomorrow at highest(high[0],vara)stop;
Sell tomorrow at lowest(low[0],vara)stop;
ExitLong tomorrow at lowest(low,varb)stop;
Exitshort tomorrow at highest(high,varb)stop;

if date >date[1] then begin
if commoditynumber =7 then
print(file ("c:\dynamic\ct"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);


if commoditynumber =8 then
print(file ("c:\dynamic\hg"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);

if commoditynumber =127 then
print(file ("c:\dynamic\sf2"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);


if commoditynumber =144 then
print(file ("c:\dynamic\us2"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);

if commoditynumber =262 then
print(file ("c:\dynamic\jy2"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);



if commoditynumber =188 then
print(file ("c:\dynamic\cl"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);


if commoditynumber =2 then
print(file ("c:\dynamic\lc"),
date:6:0,",",
DAYOFWEEK(date):1:0,",",
CurrenTtime:4:0,",",
openpositionprofit+netprofit,",",
netprofit,",",
maxiddrawdown,",",
marketposition:1:0);



END;