Are you using end of day data, or intra day? If end of day, try something like
SetTradeDelays(0, 0, 0, 0);
SetOption("AllowSameBarExit", true);
Buy = ...;
BuyPrice = Open;
Sell = 1;
SellPrice = Close;
Mike
--- In [email protected], Tony M <pqj...@...> wrote:
>
> Please help me with a simple exit strategy: when backtesting, I open my
> positions at the open in the morning, how can I close at the close of the
> same day?
>
> I can use ApplyStop( stopTypeNBar, stopModeBars, 1) to close at the second
> day, but I can not figure out a way to close at the same day.
>
> Thanks,
> TM
>