龙听期货论坛's Archiver

龙听 发表于 2022-11-3 11:54

【On Balance Volume】

[code]
inputs:
        AlertLength( 14 ) ;

variables:
        var0( 0 ) ;

var0 = OBV ;

Plot1( var0, "OBV" ) ;

condition1 = LowestBar( C, AlertLength ) = 0 and LowestBar( var0, AlertLength ) > 0 ;
if condition1 then
        Alert( "Bullish divergence - new low not confirmed" )
else
begin
condition1 = HighestBar( C, AlertLength ) = 0 and HighestBar( var0, AlertLength ) > 0 ;
if condition1 then
        Alert( "Bearish divergence - new high not confirmed" ) ;
end;
[/code]

页: [1]