NexusFi: Find Your Edge


Home Menu

 





RESET BARS COUNT


Discussion in NinjaTrader

Updated
    1. trending_up 1,885 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
quantismo's Avatar
 quantismo 
Christiansburg Virginia
 
Experience: Advanced
Platform: retired ...maybe
Trading: anything with the slightest edge..
Posts: 246 since Jul 2011
Thanks Given: 352
Thanks Received: 185

I know that bars in a chart are counted from left to right and was wondering if anyone know a way to code a reset for the count ? For example if I opened a one minute chart at the end of the day with one only one day of history there should be 1440 candles and the count would look like 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16....etc.
I was wondering if somehow I can put a reset in the middle of the count so it goes like 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7... etc.
does anyone have a idea of what code snippet may do that ? basically I am trying create a bar counter to loop so that it would end at the seventh bar and start over with 1 after every 7th bar.
I am guessing this can only be done by making an array of some sort...

Thanks Quantismo..


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
No book, only a stair: journaling fills where price move …
Cryptocurrency
My Rant with AMP Futures
Trading Reviews and Vendors
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


you could use currentbar/7 to figure out how many loops it has.


Reply With Quote
Thanked by:




Last Updated on April 14, 2015


© 2026 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 - Downloads - Top
no new posts