Originally posted by PXG
Kymar,
I am not sure if I understood your post correctly, but actually, TS "knows" at the close of current bar what the open of next bar is going to be.
Try:
Buy Next Bar at Open of Next Bar + 0.2 Stop;
SellShort Next Bar at Open of Next Bar - 0.2 Stop;
You can use "Next Bar" only with "Open", "Date", and "Time".
Thanks for pointing out the exception, which is not very well covered in the EL documentation, as far as I can tell. I knew you could write "next bar on open" orders, but I didn't know that you could add or subtract from the next bar's open. Learn something every day...
My point about EL not knowing on the current bar what the levels will be on the next bar is still generally valid, and I do still find it helpful to think of EL as establishing triggers at the end of each current bar for possible execution on subsequent bars. You can write a trading a signal, as in your example, that will utilize the "next" open (or, as you point out, date or time). You can't write a signal that operates within the next bar as some if/then condition or other event (a level being "crossed") is resolved. If you use a Moving Average as a stop, for instance, it sets the stop at the value of MA at the close of the bar, rather than "waiting" to see what the value of the MA becomes over the course of the new bar's development - even though you can see the indicator updating in realtime to different values.
Even using the "next open" exception, you will encounter complications relating to the whole tick resolution/bouncing ticks issue. The long side of the signal that was being discussed might look like this:
*********************************
{Long Entry}
Buy Next Bar at Open of Next Bar + 0.2 Stop;
{1st Bar/"Stand By" Exits}
If MarketPosition = 0 then Sell ("1Prof") Next Bar at Open Next Bar + .4 Limit;
If MarketPosition = 0 then Sell ("1Stop") Next Bar at Open Next Bar Stop;
{Subsequent bar Exits}
If MarketPosition = 1 then Sell ("Prof") Next Bar at EntryPrice + .2 Limit;
If MarketPosition = 1 then Sell ("Stop") Next Bar at EntryPrice - .2 Stop;
***************************
If you put that on a 5-minute chart under the default resolution, you'll get a very different result than if you use 1-minute resolution, and yet a different result if you apply it in real time trading (which is tick by tick).
If you add:
SELL ("AVGX") next bar at Average(L,5) stop;
And also plot an MA of the Lows and input 5 for length, you'll see the differences also.
)