Pagina 1 van 1

PivotHighVSBar

BerichtGeplaatst: vr 04 apr 2003, 12:02
door Paul M
Heeft iemand de volgende functie's:
PivotHighVSBar,
PivotLowVSBar.

Alvast bedankt,
Paul

PivotHighVSBar

BerichtGeplaatst: vr 04 apr 2003, 13:50
door GM
{*******************************************************************
Description: This Function returns Pivot High Bar with variable strengths
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}

Inputs: ?Occur(Numeric), Price(NumericSeries), LStren(NumericSimple), RStren(NumericSimple), Length(Numeric);
Variables: SHBar(0), MainLoop(0), count(0), PivotFlag(False);
Array: PivotBar[50](0);

For Value1 = 0 to 50 Begin
PivotBar[Value1] = 0 ;
End;
PivotFlag = False;
For MainLoop = Length-1 DownTo Rstren Begin
Condition1 = True;
Condition2 = True;
SHBar = Price[MainLoop];

For value1 = MainLoop - RStren To MainLoop - 1 Begin
If SHBar <= Price[value1] Then
Condition1 = False;
End;

If Condition1 Then Begin
For value1 = MainLoop + 1 To MainLoop + LStren Begin
If SHBar < Price[value1] Then
Condition2 = False;
End;
End Else
Condition2 = False;

If Condition1 AND Condition2 Then Begin
For count = 50 DownTo 2 Begin
PivotBar[count] = PivotBar[count-1];
End;
PivotBar[1] = MainLoop;
PivotFlag = True;
End;
End;

If PivotFlag AND PivotBar[Occur] <> 0 Then
PivotHighVSBar = PivotBar[Occur] + CurrentBar - BarNumber
Else
PivotHighVSBar = -1;

PivotHighVSBar

BerichtGeplaatst: vr 04 apr 2003, 13:51
door GM
{*******************************************************************
Description: This Function returns PivotLow bar with variable strengths
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}

Inputs: Occur(Numeric), Price(NumericSeries), LStren(NumericSimple), RStren(NumericSimple), Length(Numeric);
Variables: SLBar(0), MainLoop(0), count(0), PivotFlag(False);
Array: PivotBar[50](0);

For Value1 = 0 to 50 Begin
PivotBar[Value1] = 0 ;
End;
PivotFlag = False;
For MainLoop = Length-1 DownTo Rstren Begin
Condition1 = True;
Condition2 = True;
SLBar = Price[MainLoop];

For value1 = MainLoop - RStren To MainLoop -1 Begin
IF SLBar >= Price[value1] Then
Condition1 = False;
End;

IF Condition1 Then Begin
For value1 = MainLoop + 1 To MainLoop + LStren Begin
IF SLBar > Price[value1] Then
Condition2 = False;
End;
End Else
Condition2 = False;

IF Condition1 AND Condition2 Then Begin
For count = 50 DownTo 2 Begin
PivotBar[count] = PivotBar[count-1];
End;
PivotBar[1] = MainLoop;
PivotFlag = True;
End;
End;

IF PivotFlag AND PivotBar[Occur] <> 0 Then
PivotLowVSBar = PivotBar[Occur] + CurrentBar - BarNumber
Else
PivotLowVSBar = -1;

PivotHighVSBar

BerichtGeplaatst: vr 04 apr 2003, 22:45
door Paul M
Geert bedankt.

Paul