Hello-
I have been poking around the forums for a while and see lots of discussion on the Currency Slope Strength indicator that Baluda created (I personally have played with v1.0.8). I understand how to read the values. I understand that it is comparing the currencies to each other in an "indexing" manner such that the sum of all "strengths" = 0. My question is simply - what is the formula used to derive these values? I'm curious to see how the scores are created. I tried looking on this website and elsewhere, but have not yet found a post discussing the technicalities.
Thanks for the help.
CSS - how is it calculated?
- ManDrone
- Posts: 4
- Joined: Mon Nov 04, 2013 11:27 pm
- Location: Seattle, WA USA
CSS - how is it calculated?
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision. - Bertrand Russell
-
phil_trade
Re: CSS - how is it calculated?
Hi MandroneManDrone wrote:Hello-
I have been poking around the forums for a while and see lots of discussion on the Currency Slope Strength indicator that Baluda created (I personally have played with v1.0.8). I understand how to read the values. I understand that it is comparing the currencies to each other in an "indexing" manner such that the sum of all "strengths" = 0. My question is simply - what is the formula used to derive these values? I'm curious to see how the scores are created. I tried looking on this website and elsewhere, but have not yet found a post discussing the technicalities.
Thanks for the help.
CSS is derived from Slope calculation. Example below in Delphi :
Code: Select all
function calcTmaTrue(symbol : string ; tf : integer; shift : integer):double;
var
res, weight, Mysum:double;
i,knx :integer;
begin
Mysum := 0;
weight := 0;
knx := 20;
for i:=0 to knx do
begin
Mysum := Mysum + iClose(symbol, tf, shift + i)*(knx+1 - i);
weight := weight + (knx+1 - i);
end;
res := Mysum/weight;
result:=res;
end; //function calcTmaTrue(symbol : string ; tf : integer; shift : integer):double;
//+------------------------------------------------------------------+
function calcPrevTrue(symbol : string ; tf : integer; shift : integer):double;
var
dblSum, dblSumw:double;
jnx, knx:integer;
begin
dblSum := iClose( symbol, tf ,shift + 1) * 21;
dblSumw := 21;
dblSum := dblSum +iClose( symbol, tf, shift) * 20;
dblSumw := dblSumw +20;
knx := 20;
for jnx := 1 to 20 do
begin
dblSum := dblSum +iClose( symbol, tf, shift + 1 + jnx) * knx;
dblSumw := dblSumw +knx;
dec(knx);
end;
result:=dblSum / dblSumw;
end; //function calcPrevTrue(symbol : string ; tf : integer; shift : integer):double;
//+------------------------------------------------------------------+
Function GetSlope(symbol : string ; tf : integer ; shift : integer ; i : integer ) :double ;
var
atr , gadblSlope, dblTma, dblPrev : double;
begin
atr :=0;
//atr := iATR(symbol, tf, 100, shift + 10) / 10;
if (tf = 10080) then atr := GetIndicatorValue(ATR_W1[i], shift + 10 , 0) / 10;
if (tf = 1440) then atr := GetIndicatorValue(ATR_D1[i], shift + 10 , 0) / 10;
if (tf = 240) then atr := GetIndicatorValue(ATR_H4[i], shift + 10 , 0) / 10;
if (tf = 60) then atr := GetIndicatorValue(ATR_H1[i], shift + 10 , 0) / 10;
gadblSlope := 0.0;
if not( atr = 0 ) then
begin
if CalculSlopeTrueTMA=1 then
begin
dblTma := calcTma(symbol, tf, shift );
dblPrev := calcTma(symbol, tf, shift + 1 );
end
else
begin
dblTma := calcTmaTrue(symbol, tf, shift);
dblPrev := calcPrevTrue(symbol, tf, shift);
end;
gadblSlope := ( dblTma - dblPrev ) / atr;
end;
// arrondi à la 3ème décimale
result := RoundTo(gadblSlope,-3) ;
end;//Function GetSlope(symbol : string , tf : integer, shift : integer ) :double ;cheers
philippe
- nanningbob
- Trader
- Posts: 4564
- Joined: Sun Dec 04, 2011 1:23 pm
Re: CSS - how is it calculated?
The CSS originally was calculated from the tma indicator. Triangular moving average, which makes a very smooth high.low.middle lines on a chart. The slope angle from each currency like aud/USD' aud/cad aud/chf etc was then averaged and made into a single line representing the entire strength or weakness of a currency. The theory behind it is you trade strength against weakness to catch the biggest moves. The numbers are changed in the different editions to maximize the movement of the currencies.
I trade http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3964,
I talk about my philosophy of trading here.
http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3627
"The key to converting something useful to others is simplicity. Complexity is the enemy to execution." Tony Robbins
I talk about my philosophy of trading here.
http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3627
"The key to converting something useful to others is simplicity. Complexity is the enemy to execution." Tony Robbins