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

[RT] GEN - code for smart money dumb money SMDM V2



PureBytes Links

Trading Reference Links

Here is Clyde Lee's fix for the SMDM summation code.  The {intro} is self
explanatory.
He has agreed to field coding questions reguarding the code below.  Attached
is the .ela.

{================================================================

SMDM summation

Adapted from the book "Street Smarts" by Raschke and Connors Smart Money
Index,
  DM = dumb money Buy/Sell in first half hour,
  SM = smart money Buy/Sell in final hour,
  DMTimBeg and DMTimEnd set the dumb money period,
  SMTimBeg and SMTimEnd set the smart money period.
  Adjust input N so that first day does not distort the data.
  Coded by Bob Roeske bobrabcd@xxxxxxxxxxxxx 6/10/2001
  Fixed by Clyde Lee  clydelee@xxxxxxxxxxxx  6/13/2001
 ================================================================}

Inputs:   DMTimBeg(0630),
          DMTimEnd(0700),
          SMTimBeg(1200),
          SMTimEnd(1300),
          LenS(10),LenM(50),LenL(200);

Vars:  DM(0),SM(0),PSM(0),SMT(0),SMDMS(0),
       SmoothS(0),SmoothM(0),SmoothL(0);
Vars:  AlphaS(2/(LenS+1)),AlphaM(2/(LenM+1)),AlphaL(2/(LenL+1));
Vars:  DidInit(False), HoldO(0), Kount(0);

If Date<>Date[1] then begin
  DidInit=True;
  HoldO=Open;
  Kount=Kount+1;
End;

If DidInit then begin

  If Time=DMTimEnd then DM = (HoldO-Close);
  If Time=SMTimBeg then SM=Close;
  If Time=SMTimEnd then begin
    PSM = Close-SM;
    SMT = DM +PSM;
    SMDMS = SMDMS+SMT;
    If Kount=1 then begin
      SmoothS=SMDMS;
      SmoothM=SMDMS;
      SmoothL=SMDMS;
    End
    Else begin
      {We will use XAverage equivalent so only happens once per day}
      SmoothS = SMDMS*AlphaS+SmoothS*(1-AlphaS);
      SmoothM = SMDMS*AlphaM+SmoothM*(1-AlphaM);
      SmoothL = SMDMS*AlphaL+SmoothL*(1-AlphaL);
    End;
    PLOT1(SMDMS,"SMDMS");
    Plot2(SmoothS,"SmoothS");
    Plot3(SmoothM,"SmoothM");
    Plot4(SmoothL,"SmoothL");
   End;
end;



To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Attachment: Description: "SMDMV2.ELA"