Will
Yes it is possibe to exit on the same bar as the entry. I posted the following for Charmeta about 4 weeks ago and your question is virtually the same.
Use a forward reference for your Buy Order code (and Price code too if that's how you are defining entry price), and then apply a Strategic Delay of 1 bar to the Buy order.
That allows the Enhanced System Tester to "Consider" the order 1 bar prior to when it thinks it will be executed, then Execute the order on the correct day. The Sell Order remains as is and has neither a forward reference nor a delay applied.
I've explained this process more fully in a couple Of MSTT articles, and I can assure you that it does work. I think the problem is that the EST WILL NOT "Consider" a Buy and a Sell on the same bar, but it can certainly be tricked into executing on the same EOD bar.
{Buy Order}
Ref(Fml("My Buy Signal"),+1);
{Price}
Ref(Fml("My Buy Price"),+1);
Strategic Delay (bars); [1]
{Sell Order}
Fml("My Sell Signal");
Strategic Delay (bars); [0]
Set the Simulation Buy Price to OPEN and Delay order opening to 0.
Note that testing does not occur on the last bar of data when using a forward reference of 1 bar, but this is of little consequence in the general scheme of things.
Roy
MetaStock Tips & Tools