NexusFi: Find Your Edge


Home Menu

 





Range Bar Time


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one zeller4 with 7 posts (10 thanks)
    2. looks_two RJay with 2 posts (0 thanks)
    3. looks_3 hondo69 with 2 posts (0 thanks)
    4. looks_4 sefstrat with 2 posts (4 thanks)
      Best Posters
    1. looks_one wh with 2 thanks per post
    2. looks_two sefstrat with 2 thanks per post
    3. looks_3 aligator with 2 thanks per post
    4. looks_4 zeller4 with 1.4 thanks per post
    1. trending_up 11,969 views
    2. thumb_up 18 thanks given
    3. group 10 followers
    1. forum 19 posts
    2. attach_file 7 attachments




 
Search this Thread

Range Bar Time

  #1 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

Hello All,

Range bars are new to me since being introduced to this forum. Thanks Mike, Sharky and others who continually share..

I'm not sure if a range timer display would show the bar's duration and if anyone feels that would be good information to show how long a bar is stuck without moving. some of the bars in the screenshot are 10 minutes long (might as well go to lunch)

I'm testing this script but don't know how to set it to display minutes:seconds... Any help would be greatly appreciated.
Kirk

Attached Thumbnails
Click image for larger version

Name:	ZN 09-09  6_26_2009 (4 Range).jpg
Views:	506
Size:	93.3 KB
ID:	400  
Attached Files
Elite Membership required to download: Range_Bar_Duration.zip
Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787

Kirk,,

Range bars are plotting price movement in both X and Y axis on the chart.

There is no fixed time, volume or trade ticks to define when the bar will close.

Same story with Renko bars.

I hope this helps,

RJay

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


I understand that RJay,

I'm merely trying to see how long in minutes it took to print the last bar. I believe that will then allow me to place a moving average to that number and see the "speed" of the current price movement. If the current 4 range bars are plotting in 10-30 seconds compared to 5 minute plot per bar, there might be strength or momentum in the current move...

not just a standard momentum indicator...
just a way to show time of one bar's time minus the last
not even sure if this is the best way to do this..
 
Code
Value.Set(ToTime(Time[0]) - ToTime(Time[1]));

Does that make sense?

kz

Started this thread Reply With Quote
  #4 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 758
Thanks Received: 787

OK I getting the picture.

I'm pretty sure Time[0] is a right now data series, it changes every tick.

To get past this, First I would change to bar close update setting.

// CalculateOnBarClose = false;

CalculateOnBarClose = true;

Now its just Time[0] - Time[1] or what ever your criteria is.

Plot the value in a bars off the price chart.

Let me know,

RJay





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

Okay, that looks good, now to change time shown as

8297 on the 12:19 bar (which took from 11:36 to 12:19 to form)

to 00:00 for minutes:seconds...

see attached chart, (display data box doesn't come with the attached image)

do you know how to do the re-formatting?

thanks,
kz

Attached Thumbnails
Click image for larger version

Name:	ZN 09-09  6_24_2009 (4 Range).jpg
Views:	303
Size:	73.5 KB
ID:	402  
Started this thread Reply With Quote
  #6 (permalink)
Neal
Dallas
 
Posts: 23 since Jun 2009
Thanks Given: 27
Thanks Received: 27

Hey zeller4, I like the way you are thinking. I can see how your indicator may confirm the 'lunch lull' and other persistent slower price action time frames that might be less conducive to a momentum strategy. I'm curious if there is a direct correlation that will be useful. Thanks for giving this a go.

Neal

Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,442 since Jun 2009
Thanks Given: 33,215
Thanks Received: 101,603

zeller4,

You are on the right track. It is important to know the length of a bar when compared to an "average" length. If the bar moves incredibly quick, it can signal a change in momentum, whereas if a bar takes a long time, it can signal chop.

I think you should consider adding an additional double to your script to record the average time of a bar, and then maybe paint the Countdown clock in a certain fashion depending if the current bar is above or below the average by a certain threshold, like 50% or something.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

great idea Mike,

I'll look into that for the next version...

got some reading to do to figure out the formatting...

kz

Started this thread Reply With Quote
  #9 (permalink)
 
sefstrat's Avatar
 sefstrat 
Austin, TX
 
Experience: Advanced
Platform: NT/Matlab
Broker: Interactive Brokers
Trading: FX majors
Posts: 285 since Jun 2009
Thanks Given: 20
Thanks Received: 768

Here is how I do it:

 
Code
TimeSpan span = Bars.GetTime(CurrentBar) - Bars.GetTime(CurrentBar -1); 			 

series.Set(span.TotalMinutes);

Reply With Quote
Thanked by:
  #10 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404


Thanks to sefstrat and researching string formatting, I now have the following:

see attached screenshot.

per Mike's suggestion I'm using different colored background if it's less than the EMA(5) - not sure about the 50% level, please update as you see fit.

not sure if 5 is the "right" number for now.

still need help with formatting the EMA value... yes, I'm still in the "learning library"!

Kirk

Attached Thumbnails
Click image for larger version

Name:	ZN 09-09  6_29_2009 (4 Range).jpg
Views:	481
Size:	73.4 KB
ID:	431  
Attached Files
Elite Membership required to download: Range_Time_v01.zip
Started this thread Reply With Quote




Last Updated on July 17, 2012


© 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