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

short coding help needed



PureBytes Links

Trading Reference Links

Hello,

could someone point me to the right way with this code?
I just want that either the StopLow or the StopHigh is plotted and not both
at the same time.
Must be something trivial but I can't find the solution.
Thanks Jim



Input: Mult(3), Length(21);
Vars:  AR(0),AR1(0);

AR = low -Average(Range, Length);
AR1 = high + average(range, length);

if low < AR[1]
 then AR = low - average(range,length)
else
 if AR[1] > AR
 then AR = AR[1];
plot1(AR,"StopLow");


if high > AR1[1]
 then AR = high + average(range, length)
 else
  if AR1[1] < AR1
  then AR1 = AR1[1];
 plot2(AR1,"StopHigh");