Traders Laboratory - View Single Post - Various Indicators (Squeeze,2FastMa's,etc)
View Single Post
  #18 (permalink)  
Old 04-21-2008, 05:09 AM
Blu-Ray's Avatar
Blu-Ray Blu-Ray is offline
Blu-Ray is or is not online

Trader Specs
 
Join Date: Nov 2006
Location: England
Posts: 401
Thanks: 92
Thanked 34 Times in 22 Posts
Re: Various Indicators (Squeeze,2FastMa's,etc)

Quote:
View Post
Blue Ray, those look great. Would you be able to code (for TS) the slower MA's (the two dotted ones)? It makes for a great study for a beginner like me (as well as learning how to code). Thanks!!

Yes, No probs, here you go..........I've coded it up as per pic on website, but I've missed out the darkred section as that is when you the 2 MA's are within are certain distance ( and for that reason you need to select stocks,futures or forex ) ....... probably unnecessary as you can eyeball when they are very close.



and the code :

Inputs:
Price(Close),
Length1(49),
Length2(89),
UpColor(Green),
DnColor(Red),
EarlyWarnColor(Yellow);

Vars:
FastEMA(0),SlowEMA(0);


FastEMA = xaverage(Price,Length1);
SlowEMA = xaverage(Price,Length2);

Plot1(FastEMA,"FastEMA");
Plot2(SlowEMA,"SlowEMA");

if FastEMA > SlowEMA then begin
setplotcolor(1,UpColor);
setplotcolor(2,UpColor);
end;

if FastEMA > SlowEMA and close < FastEMA then begin
setplotcolor(1, EarlyWarnColor);
setplotcolor(2, EarlyWarnColor);
end;

if FastEMA < SlowEMA then begin
setplotcolor(1,dnColor);
setplotcolor(2,dnColor);
end;

if FastEMA < SlowEMA and close > FastEMA then begin
setplotcolor(1, EarlyWarnColor);
setplotcolor(2, EarlyWarnColor);
end;



Hope this helps

Blu-Ray
Attached Images
File Type: png 2EMAColor.png (12.7 KB, 571 views)
Attached Files
File Type: eld BR_2EMA_COLOR.ELD (3.9 KB, 86 views)

__________________
Remember - Take the path of least resistance.
Reply With Quote