PivotHighVSBar

Vragen en suggesties over Vesticode

Moderator: Perry

PivotHighVSBar

Berichtdoor Paul M » vr 04 apr 2003, 12:02

Heeft iemand de volgende functie's:
PivotHighVSBar,
PivotLowVSBar.

Alvast bedankt,
Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

PivotHighVSBar

Berichtdoor GM » vr 04 apr 2003, 13:50

{*******************************************************************
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;
GM
 
Berichten: 80
Geregistreerd op: ma 06 jan 2003, 19:26

PivotHighVSBar

Berichtdoor GM » vr 04 apr 2003, 13:51

{*******************************************************************
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;
GM
 
Berichten: 80
Geregistreerd op: ma 06 jan 2003, 19:26

PivotHighVSBar

Berichtdoor Paul M » vr 04 apr 2003, 22:45

Geert bedankt.

Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21


Keer terug naar Vesticode

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 12 gasten

cron