Jump to content

Recommended Posts

Posted

While waiting for someone to share what was requested in post #1, if it would be helpful, I found in my archives this Trading System in Easylanguage with reference to Dennis Meyers' article, "Surfing The Linear Regression Curve With Bond Futures" (Technical Analysis of Stocks & Commodities May 1998):

 

-------------------------------------------------------------------------

 

inputs: ndays(30),

pctup(.01425),

pctdn(.01425),

jmpup(.0035),

jmpdn(.0050);

 

vars: pf(0),

le(0),

se(0);

 

pf = linearregvalue(close, ndays, 0);

 

if currentbar > ndays then begin

 

if marketposition = 0 then begin

if pf / pf[2] > 1 + jmpup then begin

buy tomorrow open;

le = 1;

end;

if pf / pf[2] < 1 - jmpdn then begin

sellshort tomorrow open;

se = 1;

end;

end;

 

if marketposition = 1 then begin

if pf < highest(pf, le) * (1 - pctdn) then begin

sellshort tomorrow open;

le = 0;

end;

le = le + 1;

end;

 

if marketposition = -1 then begin

if pf > lowest(pf, se) * (1 + pctup) then begin

buy tomorrow open;

se = 0;

end;

se = se + 1;

end;

 

end;

 

---------------------------------------------------------------------------

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...