NexusFi: Find Your Edge


Home Menu

 



Categories Help    






The Elite Circle
File sharing for Elite Members only, includes any and all platforms and file types


Entries
Reversal Bars 5 *
This is my first shot at a custom bar type, so please report any issues in the discussion thread: https://nexusfi.com/elite-circle/26005-reversal-bars.html

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:

 
Code
//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:
 
Code
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
Log:
- 10/27/13 : Fixed code causing issues in market replay. Thanks @devdas.


Category The Elite Circle 
 
Suggest other entries I might like
Details: Reversal Bars
Category: The Elite Circle 


February 22nd, 2013
Size: 1.85 KB
 


 
Category
 




© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top