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

Preventing re-entry on same bar as exit



PureBytes Links

Trading Reference Links


Try something like this:

if condition1 and condition3 and condition5 then begin
 if marketposition < 0 then
  exitshort ("exitshort.norev") at market
 else
  buy ("Buy");
end
else if condition2 and condition4 and condition6 then begin
 if marketposition > 0 then
  exitlong ("exitlong.norev") at market
 else
  sell ("Sell");
end;