Range bars by definition end when the price leaves the range.
So what do you mean with "closing price of current range bar"?
The lower/upper limit of the range bar? (A limit order / stop order there would be an answer then ...)
To avoid the usual pitfalls with "backtesting" on range bars, look for the related threads here on futures.io (formerly BMT).
Last edited by choke35; December 24th, 2014 at 05:58 AM.
A strategy can be used to accomplish this. If your strategy is set to "CalculateOnBarClose=True" then you can use the buy or sell limit method with Close as the limit price ...
When the current range bar closes the strategy will place a limit order to buy at the closing price of the current range bar. Since it is a limit order, it may or may not be filled dependent upon future price action.