Ahh, finally! Renamed my search to DeMarker instead of DeMark and got the description in the most obvious of places!
Good description of the indicator can be found here since it is copyrighted:
http://www.metaquotes.net/techanalysis/indicators/demarker
And of course here is the wealthscript Indicator code (use the indicator wizard to make sure it shows up in the drag and drop indicator tab):
///////////////////////
function DeMarkerSeries( HighSeries: Integer; LowSeries: Integer; Period: Integer ): integer;
begin
var Bar: integer;
var sName: string;
var Value: float;
var DeMaxSeries, DeMinSeries, DeMSeries: integer;
var SMADeMaxSeries, SMADeMinSeries: integer;
sName := 'DeMarker(' + GetDescription( HighSeries ) + ',' + GetDescription( LowSeries ) + ',' + IntToStr( Period ) + ')';
Result := FindNamedSeries( sName );
if Result >= 0 then
Exit;
Result := CreateNamedSeries( sName );
//Calculate DeMaxSeries and DeMinSeries first
DeMaxSeries := CreateSeries;
DeMinSeries := CreateSeries;
for Bar := 1 to BarCount() - 1 do begin
//If today's high is greater than yesterday's then log the difference
//otherwise assign 0
if @HighSeries[Bar] > @HighSeries[Bar-1] then begin
@DeMaxSeries[Bar] := @HighSeries[Bar] - @HighSeries[Bar-1];
end
else begin
@DeMaxSeries[Bar] := 0;
end;
//If today's low is less than yesterday's low, then log the difference (absolute),
//otherwise assign = 0
if @LowSeries[Bar] < @LowSeries[Bar-1] then begin
@DeMinSeries[Bar] := @LowSeries[Bar-1] - @LowSeries[Bar];
end
else begin
@DeMinSeries[Bar] := 0;
end;
end;
//Calculate DeMarker second
DeMSeries := CreateSeries;
SMADeMaxSeries := CreateSeries;
SMADeMinSeries := CreateSeries;
//smooth SMADeMaxSeries by Period
SMADeMaxSeries := SMASeries(DeMaxSeries,Period);
//smooth SMADeMinSeries by Period
SMADeMinSeries := SMASeries(DeMinSeries,Period);
//get ratio of max ( max / (max + min))
DeMSeries := divideseries(SMADeMaxSeries,(AddSeries(SMADeMaxSeries,SMADeMinSeries)));
//assign results to indicator
for Bar := Period to BarCount() - 1 do begin
Value := @DeMSeries[Bar];
SetSeriesValue( Bar, Result, Value );
end;
end;
function DeMarker( Bar: integer; HighSeries: Integer; LowSeries: Integer; Period: Integer ): float;
begin
Result := GetSeriesValue( Bar, DeMarkerSeries( HighSeries, LowSeries, Period ) );
end;
///////////////////////
Attached is a pic of the indicator on AAPL 5 min.
ES, can you confirm this is the same interpretation of the indicator that you are using.
If anyone finds a mistake or oversight in this source please let me know.
Now Still waiting for info from anyone on the CR indicator, anyone?
thx