PureBytes Links
Trading Reference Links
|
With Bob Fulks' permission see below (function and indicator).
{ *******************************************************************
Function: TicksPerMin
Last Edit: 3/22/99
Coded By: Bob Fulks
Description: Calculates ticks per minute on intraday charts
(Based upon an idea from Randall Kurzon)
Errors: Returns -1 on other than intraday charts.
********************************************************************}
Var: Tks(0), TPM(0), Tim1(0), Ctr(0);
if DataCompression = 0 then begin
Tim1 = TimetoMinutes(Time);
if Tim1 <> Tim1[1] then begin
TPM = Tks;
Tks = Ticks;
end else Tks = Tks + Ticks;
end else if DataCompression = 1 then begin
TPM = Ticks / BarInterval;
end else TPM = -1;
TicksPerMin = TPM;
{ *******************************************************************
Indicator: TicksPerMinute
Last Edit: 3/22/99
Coded By: Bob Fulks
Description: Plots a smoothed ticks per minute on intraday charts
(Based upon an idea from Randall Kurzon)
Errors: Returns -1 on other than intraday charts.
********************************************************************}
Input: Periods(3), Min(30);
Value1 = TicksPerMin;
Value2 = Average(Value1, Periods);
if Value2 crosses above Min or Value2 crosses below Min then condition1 =
true else condition1 = false;
if condition1 and checkalert then alert = true else alert = false;
Plot1(Value2, "TPM");
Plot2(Min, "Min");
|