PureBytes Links
Trading Reference Links
|
heypeter@xxxxxxxxxxxxxx wrote:
>
> Hi
>
> 1/Make sure you named the function ...Arrowdown...
> 2/Do not declare Arrowdown as a variable.
> This is the correct code:
> Function: Arrowdown
>
> input: lookback(NumericSimple);
> Vars: counter(0);
> Array: arrows[10](0);
>
> If L>L[1] and L[1]>L[2] and L[2]<L[3] and L[3]<L[4]
> then begin
> for counter = 9 downto 1 begin
> arrows[counter] = arrows[counter-1];
> End;
> arrows[0] = L[2];
> End;
>
> arrowdown = arrows[lookback];
>
> Later
>
> Peter
>
> Ian Cunningham wrote:
> >
> > Message text written by INTERNET:heypeter@xxxxxxxxxxxxxx
> > >James Murphy wrote:
> > >
> >
> > > for counter = 9 downto 1 begin
> > > arrows[counter] = arrows[counter-1];
> > > arrows[0] = Low[2];
> > > End;
> >
> > I think it should be, otherwise you will lose the value of the previous
> > arrows[0]?
> >
> > for counter = 9 downto 1 begin
> > arrows[counter] = arrows[counter-1];
> > End;
> > arrows[0] = Low[2];
> >
> > > you can call the function from indicators or systems like this
> > >
> > > value1 = lookback(0); {this return the latest arrow down}
> >
> > Isn't it: value1 = arrowdown(0); etc
> >
> > Later
> >
> > Peter
> >
> > <
> >
> > Peter,
> >
> > I have been playing with this loop as it was posted. This fills a need I
> > have as a rookie coder.
> > However, when I try to verify I get a "Value was never assigned to user
> > function"
> > message.
> > This is what I'm using:
> >
> > ***************************************************************************
> > ***************
> > Input: lookback(NumericSimple);
> > Vars: counter(0), Arrowdown(0);
> > Array: arrows[10](0);
> >
> > If L>L[1] and L[1]>L[2] and L[2]<L[3] and L[3]<L[4]
> > then begin
> > for counter = 9 downto 1 begin
> > arrows[counter] = arrows[counter-1];
> > End;
> > arrows[0] = L[2];
> > End;
> >
> > arrowdown = arrows[lookback];
> > ***************************************************************************
> > ***************
> > Any help you can give me would be very much appreciated.
> >
> > TIA, Ian.
|