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

Re: Alert condition changes indicator graph?????????????



PureBytes Links

Trading Reference Links

Stacking If, Then, Else statements several layers deep like that doesn't
work reliably and you may get random results. You need to separate the
levels with Begin, End statements for TS to keep the logic straight.

> if Close < Open then
> if Close[1] < Open  then
> BullPower = 
> MaxList( High - Close[1], Close -  Low )
> else
> BullPower = 
> MaxList( High - Open,  Close - Low)
> else if Close > Open then
> if Close[1] > Open  then

Should be:

if Close < Open then begin
   if Close[1] < Open then 
      BullPower = MaxList( High - Close[1], Close -  Low )
   else BullPower = MaxList( High - Open,  Close - Low)
end 
else if Close > Open then begin
   if Close[1] > Open  then
   etc.

-- 
  Dennis