NexusFi: Find Your Edge


Home Menu

 





RESET BARS COUNT


Discussion in NinjaTrader

Updated
    1. trending_up 1,704 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: 244 since Jul 2011
Thanks Given: 347
Thanks Received: 179

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?
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Double Deadlock: Rubio Calls Hormuz Tolls "Unfeasib …
Traders Hideout
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #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