NexusFi: Find Your Edge


Home Menu

 





RESET BARS COUNT


Discussion in NinjaTrader

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




 
Search this Thread

RESET BARS COUNT

  #1 (permalink)
 
quantismo's Avatar
 quantismo 
Waco TX.
 
Experience: Advanced
Platform: retired ...maybe
Trading: anything with the slightest edge..
Posts: 242 since Jul 2011
Thanks Given: 335
Thanks Received: 176

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?
Trade idea based off three indicators.
Traders Hideout
About a successful futures trader who didnĀ“t know anyth …
Psychology and Money Management
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
 
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


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

Reply With Quote
Thanked by:




Last Updated on April 14, 2015


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