NexusFi: Find Your Edge


Home Menu

 





Counting Bars since open of session


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one zeller4 with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 cory with 1 posts (0 thanks)
    4. looks_4 flyscalper with 1 posts (0 thanks)
    1. trending_up 6,418 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 3 attachments




 
Search this Thread
  #1 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404

Hey All,
I've seen some different syntax for counting bars from the session start. I also found this index (idx) inside the CurrentDayOHL file.
I'm not sure how to make it public so that it can be printed to the output window or to use for some other calculation / or checking.

As you can see, I'm attempting to get an updated snapshot of the current location of price to the daily High, Low, Open and also to compare bar counts for what has been above or below the open.

Currently just testing the numbers so I know the bars below open is not working...

If you'd like to modify this code and rename v02, please be my guest.
Thanks,
Kirk


Attached Thumbnails
Click image for larger version

Name:	6E 03-10  3_2_2010 (6 Range).jpg
Views:	397
Size:	54.5 KB
ID:	8927  
Attached Files
Elite Membership required to download: CurrentDayOHL_v01.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 flyscalper 
Barcelona, Spain
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: Futures
Posts: 24 since Jul 2009
Thanks Given: 35
Thanks Received: 7


I am not sure what are your question. Do you know about BarsSinceSession object?

Un saludo,

Pablo


Reply With Quote
  #4 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 478 since Jun 2009
Thanks Given: 1,419
Thanks Received: 404

Hey Pablo,

well, the attached file uses Bars.SessionBreak and then does this CurrentOpen.Count with the idx++.

I've seen this before but never programmed with it so I need to learn it. I wonder why I can't get the idx to be "callable" .

I'll try the BarsSinceSession.

Thanks,
Kirk


Started this thread Reply With Quote
  #5 (permalink)
 
Cachevary's Avatar
 Cachevary 
Russia,Khabarovsk
 
Experience: Beginner
Platform: NT
Trading: Gold
Posts: 407 since Feb 2014

What`s the vertical location and the space below/above open?


Reply With Quote
  #6 (permalink)
 
cory's Avatar
 cory 
virginia
the coin hunter
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,093


zeller4 View Post
Hey All,
I've seen some different syntax for counting bars from the session start. I also found this index (idx) inside the CurrentDayOHL file.
I'm not sure how to make it public so that it can be printed to the output window or to use for some other calculation / or checking.

As you can see, I'm attempting to get an updated snapshot of the current location of price to the daily High, Low, Open and also to compare bar counts for what has been above or below the open.

Currently just testing the numbers so I know the bars below open is not working...

If you'd like to modify this code and rename v02, please be my guest.
Thanks,
Kirk

you must have an old compiler but I understand I am still on XP myself (cue the music Tom Petty I Won't Back Down). Current NJ compile gave me fit but here is what I can come up with


Attached Files
Elite Membership required to download: CurrentDayOHL_v01.cs
Reply With Quote




Last Updated on September 17, 2014


© 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