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

Re: marketposition in 2000i



PureBytes Links

Trading Reference Links

nevi wrote:
Trying to get alternating buy/sell signals in 2000i,

Can anyone suggest a way to stop multiple buy signals.

Try setting a toggle that will hold even after you exit.

var: MP(0);

if marketposition = 1 then MP = 1;
if marketposition = -1 then MP = -1;

if MP < 1 then begin
{long entry code}
end;

if MP > -1 then begin
{short entry code}
end;

MP will be 0 for the first trade (either long or short) and it will alternate between 1 and -1 after that.

--
  Dennis