Hi Martin,
According to your new email to us
All I want to find out is how the probability of an index ranging 10 points up and then 10 points down from its open price over a given time line. I want to use write a formula or some use existing indicators or features in tradecision to do this...Here is the code for a custom indicator (use
Indicator Builder) provided by our Improvian mavens as Free Improvian Consulting Services for Tradecision customers (
www.tradecision.com/support/improvian_consulting.htm):
Input
length:"Lenght",20;
pointsUp:"Points Up",0.3;
pointsDown:"Points Down",0.3;
end_input
var
i:=0;
ud:=0;
lastPivot:=Close;
count:=0;
end_var
for i:=0 to length do {go to reverse direction}
begin
if ud=0 then {finding 10 points down}
if (C\i\-lastPivot>pointsDown) then begin ud:=1; lastpivot:=C\i\; end;
else
if lastPivot>C\i\ then lastPivot:=c\i\;
if ud=1 then {finding 10 points up}
if (lastPivot-C\i\>pointsUp) then begin ud:=0; count:=count+1; lastpivot:=C\i\; end;
else
if lastPivot<C\i\ then lastPivot:=c\i\;
end;
return count;
Hopefully it will help you in trading.
Sincerely,
Tradecision Support Team