Hi
Could someone help me convert this TS code to esignal please
{ Summation, fast calculation (series function) }
inputs:
Price( numericseries ),
Length( numericsimple ) ; { this input is assumed to be constant }
variables:
Sum( 0 ) ;
if CurrentBar = 1 then
begin
for Value1 = 0 to Length - 1
begin
Sum = Sum + Price[Value1] ;
end ;
end
else
Sum = Sum[1] + Price - Price[Length] ;
SummationFC = Sum ;
ive managed to create this but ive creates a infinite number
function summation(){
psource = close()
length = 21
for (value1 = 0; x< length; -1)
sum = sum(-1) + psource - psource(value1)
return (sum)
}
thanks in advance for any help.
Could someone help me convert this TS code to esignal please
{ Summation, fast calculation (series function) }
inputs:
Price( numericseries ),
Length( numericsimple ) ; { this input is assumed to be constant }
variables:
Sum( 0 ) ;
if CurrentBar = 1 then
begin
for Value1 = 0 to Length - 1
begin
Sum = Sum + Price[Value1] ;
end ;
end
else
Sum = Sum[1] + Price - Price[Length] ;
SummationFC = Sum ;
ive managed to create this but ive creates a infinite number
function summation(){
psource = close()
length = 21
for (value1 = 0; x< length; -1)
sum = sum(-1) + psource - psource(value1)
return (sum)
}
thanks in advance for any help.
Comment