fetching next bar open price
Author: clarodina
Creation Date: 9/17/2008 8:50 AM
profile picture

clarodina

#1
hi anyone knows is there a synatx that fetch the open price of next bar? in ts this is accomplished by open next bar command.
profile picture

Eugene

#2
Open[bar+1], for backtesting.
profile picture

Cone

#3
Inside the Bars.Count loop, it's just
CODE:
Please log in to see this code.
However, you'll notice that this generates an error upon processing the last bar in the chart. Do you understand why?

The solution, then, is to not process the last bar - which is fine for backtesting, but isn't practical for trading.
CODE:
Please log in to see this code.


More discussion in the WL4 KB (same principles apply): Generating an Alert with the "Opening Price" of the Entry Bar