Official Release:
This is my first shot at a custom bar type, so please report any issues in the discussion thread:
Bar Logic
-When a new bar is formed, price must move "Direction Size" ticks to establish a bar direction.
-Once a direction is established, if price pulls back "Reversal Size" ticks, a new bar is formed.
-The previous bar does not include the final reversal tick. The final reversal tick forms a new bar.
-The opens and closes of bars are actual ticks. No fake opens or closes.
If you prefer the version that requires Reversal Size to be breached, change:
//reversalSize = bars.Instrument.MasterInstrument.Round2TickSize(bars.Period.Value * bars.Instrument.MasterInstrument.TickSize); //This gives you tips of Reversal Size
reversalSize = bars.Instrument.MasterInstrument.Round2TickSize((bars.Period.Value - 1) * bars.Instrument.MasterInstrument.TickSize); //This creates a new bar on Reversal Size
to:
reversalSize = bars.Instrument.MasterInstrument.Round2TickSize(bars.Period.Value * bars.Instrument.MasterInstrument.TickSize); //This gives you tips of Reversal Size
//reversalSize = bars.Instrument.MasterInstrument.Round2TickSize((bars.Period.Value - 1) * bars.Instrument.MasterInstrument.TickSize); //This creates a new bar on Reversal Size
DON'T DOWNLOAD THE FILE IN THIS POST, BECAUSE IT DOES NOT WORK. VISIT THE LINK AT THE TOP OF THIS POST TO GET A FULLY FUNCTIONAL VERSION.