how to count in nt7 the number of bars that have closed? - NinjaTrader | futures io social day trading
futures io futures trading


how to count in nt7 the number of bars that have closed?
Updated: Views / Replies:3,118 / 9
Created: by anniebee321 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

how to count in nt7 the number of bars that have closed?

  #1 (permalink)
Elite Member
london
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: fgbl
 
Posts: 152 since Nov 2009
Thanks: 64 given, 44 received

how to count in nt7 the number of bars that have closed?

i would like my indicator to start recalculating after every 180 bars -- any ideas how i would count the number of bars? many thanks in advance

i had it coded to reset and restart calculating at 7am each day using
if (ResetDaily && ToTime(Time[0]) >= ResetTime*100 && ToTime(Time[1]) < ResetTime*100)

but it does not work :-)

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
UK
 
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: Mirus/Zen
Favorite Futures: Futures - bonds, currencies, index
 
Posts: 288 since Oct 2010
Thanks: 70 given, 267 received


The variable CurrentBar tells you the number of the current bar. It either starts from the start of a strategy, or from the start of the session (can't remember which). In any case,

CurrentBar % 180 == 0

will be true every 180 bars.

Reply With Quote
 
  #4 (permalink)
Elite Member
london
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: fgbl
 
Posts: 152 since Nov 2009
Thanks: 64 given, 44 received

bar count

thanks xeno

will try and give that - a bash it was written for me so i hope i can amend it - will try today

Reply With Quote
 
  #5 (permalink)
Elite Member
london
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: fgbl
 
Posts: 152 since Nov 2009
Thanks: 64 given, 44 received

bar count at time

hi xeno,

it doesn't quite work perhaps because i have missing bars during some hours of some days it overlaps days
but thanks for your help on this

Reply With Quote
 
  #6 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,214 received

Answer
This post has been selected as an answer to the original posters question Answer

I am rusty, but try Bars.FirstBarOfSession to get that bar number, then compare to CurrentBar.

Something like

 
Code
                            
bool mySignal = ((CurrentBar Bars.FirstBarOfSession) >= 180
If you don't need to start at zero with each new session, then just set a flag every 180 bars (like Xeno showed).

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #7 (permalink)
Elite Member
london
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: fgbl
 
Posts: 152 since Nov 2009
Thanks: 64 given, 44 received

bar count and timer

thanks very much mike - that might be it, it looks logical - though my programming is limited
will give it a try

Reply With Quote
 
  #8 (permalink)
Elite Member
london
 
Futures Experience: Beginner
Platform: ninja
Favorite Futures: fgbl
 
Posts: 152 since Nov 2009
Thanks: 64 given, 44 received

Start of session

woohoo! that works thanks mike

Reply With Quote
 
  #9 (permalink)
Elite Member
west chester
 
Futures Experience: Intermediate
Platform: NT
 
Posts: 48 since Oct 2009
Thanks: 1 given, 52 received

bar numbering

is there an indicator that will number bars in nt7. the bar numbering indicator that i downloaded starts the first bar at zero and i have not been able to fix it.

thanks

Reply With Quote
 
  #10 (permalink)
Elite Member
Milan (I)
 
Futures Experience: Advanced
Platform: Ninjatrader
Broker/Data: Kinetick
Favorite Futures: FDAX,6E,CL,YM,NQ,ES
 
redratsal's Avatar
 
Posts: 1,653 since Oct 2010
Thanks: 1,217 given, 2,067 received



trader1512 View Post
is there an indicator that will number bars in nt7. the bar numbering indicator that i downloaded starts the first bar at zero and i have not been able to fix it.

thanks

Hi,

Try this one you will get OHLCV as well https://futures.io/elite-circle/9506-cursor-state.html

Reply With Quote

Reply



futures io > > > > how to count in nt7 the number of bars that have closed?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
highest bar close occuring within the last X number of bars . . . . jmejedi NinjaTrader Programming 37 October 6th, 2014 01:52 AM
Renko bars not working in NT7 tellytub NinjaTrader Programming 109 January 23rd, 2012 01:56 PM
How to program price cross below a number of previous bars Twiddle NinjaTrader Programming 8 May 17th, 2011 05:58 PM
BarsType.Add method - how to always detect if (bars.Count == 0)? jdfagan NinjaTrader Programming 2 June 29th, 2010 06:33 PM
Is anyone using the RangeNoGap bars in NT7? I use them alot Todd NinjaTrader 9 May 15th, 2010 04:24 PM


All times are GMT -4. The time now is 12:56 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-11 in 0.16 seconds with 37 queries on phoenix via your IP 54.145.16.43