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

Re: [RT] conv div on macd



PureBytes Links

Trading Reference Links




The following is code for a modification of 
the Omega
TS2K MACD code to use plain and exponential 
averages.
 
At the bottom is the 
function    MACD_PlainMA 
 
which you will need to create to make this 
work.
 
Please, if you have TS4 then cut and paste 
and get rid
of the TS2K specific stuff.  I do not 
fool with TS4 anymore.
 
 
Clyde
 
 
 
 
 
 
<FONT face="Courier New" 
size=2>{*******************************************************************Description 
: This Indicator plots MACDProvided By : Omega Research, Inc. (c) Copyright 
1999 ********************************************************************} 

 
Inputs: FastMA(12), SlowMA(26), MacdMA(9), 
PlainMA(true); 
 
Vars:  MACDVal(0), 
MACDAvg(0),MACDDif(0);
 
If PlainMA  Then 
MACDVal=MACD_PlainMA(Close, FastMA, SlowMA)  Else MACDVal=MACD(Close, 
FastMA, SlowMA);Plot1(MACDVal, "MACD");
 
If PlainMA  Then 
MACDAvg=Average(MACD(Close, FastMA, SlowMA), MacdMA)  Else 
MACDAvg=XAverage(MACD(Close, FastMA, SlowMA), MacdMA);Plot2(MACDAvg, 
"MACDAvg");
 
MACDDif=MACDVal-MACDAvg;Plot3(MACDDif, 
"MADiff");
 
If MACDDif>0 then begin  
SetPlotColor(1,Blue);  SetPlotColor(2,Blue);  
SetPlotColor(3,Blue);EndElse begin  
SetPlotColor(1,red);  SetPlotColor(2,red);  
SetPlotColor(3,red);End;
 
{Alert Criteria}If Plot3 Crosses Over 0 
Then  Alert("MACD has generated a bullish alert")Else  If 
Plot3 crosses under 0 Then    Alert("MACD has generated a 
bearish alert"); 
 
{MACD Expert 
Commentary}#BeginCmtry  
Commentary(ExpertMACD(Plot1));#End;
 
 
 
<FONT face="Courier New" 
size=2>{*******************************************************************Description: 
Moving Average Convergence DivergenceProvided By: Omega Research, Inc. (c) 
Copyright 1999Modified By: Clyde Lee -- use only simple 
MA********************************************************************}
 
Inputs: Price(NumericSeries), 
FastMA(NumericSimple), SlowMA(NumericSimple);
 
MACD_PlainMA = Average(Price, FastMA) - 
Average(Price, SlowMA);
 
 
 
 
- - - - - - - - - - - - - - - - - - - - -  - - - - - - -Clyde 
Lee   
Chairman/CEO          (Home of 
SwingMachine)SYTECH 
Corporation          email: <A 
href="mailto:clydelee@xxxxxxxxxxxx";>clydelee@xxxxxxxxxxxx  7910 
Westglen, Suite 105       
Office:    (713) 783-9540Houston,  TX  
77063               
Fax:    (713) 783-1092Details 
at:                      
www.theswingmachine.com- - - - 
- - - - - - - - - - - - - - - -  - - - - - - - -
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  ----- Original Message ----- 
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
  BobR 
  
  To: <A title=realtraders@xxxxxxxxxxxxxxx 
  href="mailto:realtraders@xxxxxxxxxxxxxxx";>realtraders@xxxxxxxxxxxxxxx 
  
  Sent: Friday, March 22, 2002 3:06 
PM
  Subject: Re: [RT] conv div on macd
  During one of Linda's free Java sessions she said that her 
  MACD is createdwith 3 and 10 period SIMPLE moving averages and not 
  exponential movingaverages as is found in some software 
  packages.bobr






Yahoo! Groups Sponsor


ADVERTISEMENT










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





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Attachment: Description: "junk.gif"