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

RE: Alexander Elder's "Market Thermometer" indicator"



PureBytes Links

Trading Reference Links

To List;

John Lynch was kind enough to improve the useability of Elder's Market
Thermometer code.  Below is hopefully the final code after going back and
forth with John.

Regards,

Barry Silberman
============================================================================
=
 {Barry Silberman's version of Market Thermomenter from Alexander Elder.
>From "Come Into My Trading Room" page 162.  John Lynch's added array code
and color refinements 5/5/02

 How to Use:

1-     plot temperature as a histogram and two average temperatures as
lines.

2-     if in trade already and red bar, then exit

3-     get ready for explosive move if yellow bar

4-     if not in trade, then white bar suggests a move has started

5-     set profit target for next day -- if Long, add value of today's
Thermometer EMA to yesterday's high and place sell order there;  If Short,
subtract value of today's Thermometer EMA from yesterday's low and place
orderto cover there.}



Input: Length(22), Threshhold(3), Daysunder(5);

Variable:  Temperature(0), Avgtemp(0), Thickness(1), Colour(darkblue);

 Value1 = AbsValue(high-high[1]);

Value2 = AbsValue(low[1] - low);

 Temperature = Maxlist(Value1, Value2);

Avgtemp = Xaverage(Temperature, Length);

 Thickness=1;

If temperature < avgtemp then colour=darkblue else

If temperature >= avgtemp and temperature < avgtemp*threshhold then
colour=cyan   else

  If temperature > avgtemp*threshhold then Begin Colour= red; Thickness=3;
End;

 Value4=0;

For Value3 = 0 to Daysunder-1 Begin

 If Temperature[Value3]<AvgTemp[Value3] then Value4=Value4+1;

 End;

If Value4 >= DaysUnder then Begin colour= yellow; Thickness=1; End;

If Value4[1] >= DaysUnder and temperature >= avgtemp and temperature <
avgtemp*threshhold then Begin colour= white; Thickness=3; End;

 plot1(temperature, "mkt temp", Colour,  default,  Thickness);

plot2(avgtemp, "avg temp",blue);

plot3(avgtemp*threshhold, "avg temp",red);

Attachment: Description: "ELDER MARKET TEMPERATURE.ELD"