龙听期货论坛's Archiver

龙听 发表于 2022-11-2 11:39

【PercentR】

[code]inputs: Len( numericsimple ) ;
variables: var0( 0 ), var1( 0 ) ;

var0 = Highest( High, Len ) ;
var1 = var0 - Lowest( Low, Len ) ;

if var1 <> 0 then
        PercentR = 100 - ( ( var0 - Close ) / var1 ) * 100
else
        PercentR = 0 ;
[/code]

页: [1]