[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: also...



PureBytes Links

Trading Reference Links

In a message dated 11/09/2000 2:57:52 AM Pacific Standard Time, Jimmy 56 
writes:

<< In a message dated 11/08/2000 4:51:34 AM Pacific Standard Time, 
bfulks@xxxxxxxxxxxx writes:
 
 << You might be saying something like:
  
    BarCount = BarCount + 1;
    if XXX then BarCount = 0;
      .....
    PastHigh = High[BarCount];
  
  At some point the BarCount variable could get up to some big number. Look 
at every case where you refer back to a past value and make sure the look 
back is limited to same value, independent of the data.
  
  Bob Fulks >>
 
 Yes, Bob, I am doing something just like that.  I use it to lock in the 
price of a pyramided entry, so I can then caculate stops, exits etc. from 
that price.  So I think my code is...
 
 Vars:  PyramidEntry(-1);
 IF CurrentEntries=2 then PyramidEntry= PyramidEntry + 1;
 IF CurrentEntries=1 then PyramidEntry= -1;
 condition3= PyramidEntry>=0;
 
    {PYRAMID STOP LOSS}
 
 IF condition3 then begin
 PyraStop = Open[PyramidEntry] - (ATR * ChanLen);
 end;
 
 So how do I fix this?  I think you are saying that my "Open[PyramidEntry]" 
is causing the problem.  That the pyramidentry counter just keeps counter 
higher and higher.  I was under the impression (perhaps assumtion) that the 
counter was resetting itself.  But maybe it's not.  I better look at the code 
closer and maybe just add some code that resets the variable.  Does that 
sound right to you?
 Thanks a lot!
 Jim
  >>



To: bfulks@xxxxxxxxxxxx
Subject: Re: also...
From: Jimmy56@xxxxxxx
Date: Thu, 9 Nov 2000 05:57:52 EST
Full-name: Jimmy 56

In a message dated 11/08/2000 4:51:34 AM Pacific Standard Time, 
bfulks@xxxxxxxxxxxx writes:

<< You might be saying something like:
 
   BarCount = BarCount + 1;
   if XXX then BarCount = 0;
     .....
   PastHigh = High[BarCount];
 
 At some point the BarCount variable could get up to some big number. Look at 
every case where you refer back to a past value and make sure the look back 
is limited to same value, independent of the data.
 
 Bob Fulks >>

Yes, Bob, I am doing something just like that.  I use it to lock in the price 
of a pyramided entry, so I can then caculate stops, exits etc. from that 
price.  So I think my code is...

Vars:  PyramidEntry(-1);
IF CurrentEntries=2 then PyramidEntry= PyramidEntry + 1;
IF CurrentEntries=1 then PyramidEntry= -1;
condition3= PyramidEntry>=0;

    {PYRAMID STOP LOSS}

IF condition3 then begin
PyraStop = Open[PyramidEntry] - (ATR * ChanLen);
end;

So how do I fix this?  I think you are saying that my "Open[PyramidEntry]" is 
causing the problem.  That the pyramidentry counter just keeps counter higher 
and higher.  I was under the impression (perhaps assumtion) that the counter 
was resetting itself.  But maybe it's not.  I better look at the code closer 
and maybe just add some code that resets the variable.  Does that sound right 
to you?
Thanks a lot!
Jim