PureBytes Links
Trading Reference Links
|
FWIW .. I often reference Marketposition from one or more days ago which you
can't do with the built in function.., so I declare a new var of say
"currentpos" then set Currentpos=Marketposition and then use the new var ..
it may help you
-----Original Message-----
From: DH [mailto:catapult@xxxxxxxxxxxxxxxxxx]
Sent: Monday, November 30, 2009 10:24 AM
To: nevi
Cc: omega-list@xxxxxxxxxx
Subject: Re: marketposition in 2000i
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
|