Home
    Product
    Support
    Purchase
    Company

Advanced trading software: technical analysis and neural networks

Empowering wise traders

Support Center
Publications
Tradecision FAQs
Improvian Consulting
Contact Support Team
Knowledgebase
Collection of Indicators
Custom Indicators
Custom Studies
TASC Traders' Tips
Active Trader Strategies
Golden Trading Rules
Traderís Quiz

Traders' Tips from TASC Magazine
The Spearman Indicator For Technical Analysis

The article by Dan Valku in this issue, ďThe Spearman Indicator For Technical AnalysisĒ, has demonstrated a statistical tool that helps determine trend strength and turning points, and how it can be applied to trading.

Using Tradecisionís Indicator Builder, one needs to create the SPEARMAN indicator:

SPEARMAN indicator:

input
n:"Enter Number of periods:", 10;
price:"Enter the Price:", close;
end_input

var
i:=0;
j:=0;
tmp:=0;
absum:=0;
sqrVal:=0;
dif:=0;
Array:ranks[1000]:=0;
Array:valuesTmp[1000]:=0;
end_var

if HISTORYSIZE < n then return 0;

{Fill Values}
for i:= 1 to n do
begin
     valuesTmp[i]:= price\n-i\;
end;

{Sort Values Descerding}
for i:= 1 to n - 1 do
begin
     for j:= 1 to n - 1 do
     begin
          if valuesTmp[j+1] < valuesTmp[j] then
          begin
               tmp:=valuesTmp[j];
               valuesTmp[j]:=valuesTmp[j+1];
               valuesTmp[j+1]:=tmp;
          end;
     end;
end;

{Sort Ranks using Values}
for i:= 1 to n do
begin
     for j:= 1 to n do
     begin
          if valuesTmp[j] = price\n-i\ then
          begin
               ranks[i] := j;
               j := n + 1;
          end;
     end;
end;

for i:= 1 to n do
begin
    dif := ( n - i + 1 ) - ranks[i];
    sqrVal := dif*dif;
    absum := absum + sqrVal;
end;

return (1 - (6*absum)/ (n*(n*n-1)))*100;



Download to import into Tradecision.

How to use this indicator in Tradecision:
  1. Click Download.
  2. Save this indicator in a safe location on your hard drive.
  3. Open Tradecision and in the Tools menu click Indicator Builder.
  4. In the Indicator Builder dialog, click Import, locate the saved file and then click OK.
The indicator will be added to the Custom Indicators list.
 
The Spearman Indicator For Technical Analysis
Tradecision Reviews
Video Tours
Ask a question

Site Map   |   Terms of Use   |   Privacy Policy   |   Risk Warning
Forex, equities or futures trading involves substantial risk of loss and is not suitable for all investors.
Copyright © 2001-2017 Alyuda Research, LLC.  All rights reserved