Navigation: Function Reference > Stream Functions > Stream Utility Functions > strmSwingHighBar()

strmSwingHighBar()

Top  Previous  Next

strmSwingHighBar( stream: TEStream; instance, strength, offset, trailing_bars ) : Integer;

 

Returns the bar index (integer value) to the swing high defined by instance and strength. If no swing high is found over the trailing_bars specified, then -1 is returned. A swing high occurs when the value of a bar is higher than the value of the strength preceding bars and at least as high as the value of the strength bars that follow it.

 

Parameters

 

stream

input stream of type TEStream

instance

integer value. the swing high occurrence. 1=most recent, 2=2nd most recent, etc.

strength

integer value. number of bars required on either side of a swing bar

offset

integer value. offset into the stream at which to start the calculation.

trailing_bars

integer value. total number of bars to consider when searching for the swing high

 

iLastSwingHigh := strmSwingHighBar( Symbol.high, 1, 2, 0, 100 );