What is the difference between bar types RangeAlt and RangeNoGap? - futures io
futures io futures trading



What is the difference between bar types RangeAlt and RangeNoGap?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one RJay with 3 posts (5 thanks)
    2. looks_two aligator with 3 posts (3 thanks)
    3. looks_3 ThatManFromTexas with 1 posts (0 thanks)
    4. looks_4 liquidcci with 1 posts (0 thanks)
    1. trending_up 2,109 views
    2. thumb_up 8 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 2 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

What is the difference between bar types RangeAlt and RangeNoGap?

(login for full post details)
  #1 (permalink)
Las Vegas, NV
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Trading: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,057 given, 5,841 received

What is the difference between bar types RangeAlt and RangeNoGap? Which is better? They seem to produce almost similar bars.

Visit my futures io Trade Journal Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
 
RJay's Avatar
 
Posts: 688 since Jun 2009
Thanks: 747 given, 780 received


aligator View Post
What is the difference between bar types RangeAlt and RangeNoGap? Which is better? They seem to produce almost similar bars.

Hi Aligator,

Since one of my creations is involved here, I have an interest. Post some side by side images for discussion. Better yet, post a link to the RangeAlt code. My RangeNoGap is already available in the download area.

RJay

Reply With Quote
 
(login for full post details)
  #3 (permalink)
Las Vegas, NV
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Trading: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,057 given, 5,841 received



RJay View Post
Hi Aligator,

Since one of my creations is involved here, I have an interest. Post some side by side images for discussion. Better yet, post a link to the RangeAlt code. My RangeNoGap is already available in the download area.

RJay

Thanks @RJay.

Here is the RangeAlt bar type that I downloaded here on futures.io (formerly BMT) a couple of days ago, can't recall the link.

Just a word of caution; although this bar type has been around quite awhile and the code is fine, somehow it replaced another bar type that I had in the drop-down menu (Seem like it is using the same bar type number as LineBreakWicked in my case, which is missing now)

Attached Files
Register to download File Type: zip RangeAlt7.zip (2.0 KB, 64 views)
Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
 
RJay's Avatar
 
Posts: 688 since Jun 2009
Thanks: 747 given, 780 received


aligator View Post
Thanks @RJay.

Here is the RangeAlt bar type that I downloaded here on futures.io (formerly BMT) a couple of days ago, can't recall the link.

Just a word of caution; although this bar type has been around quite awhile and the code is fine, somehow it replaced another bar type that I had in the drop-down menu (Seem like it is using the same bar type number as LineBreakWicked in my case, which is missing now)

RangeAlt Appears to be a simpler, possibly earlier version of range bar. RangeNoGap has all the Updates that are in NT7's current Range bars. See attached code.

ALT Range

if (bars.Instrument.MasterInstrument.Compare(close, bar.Low + rangeValue) > 0)
{
double newClose = bar.Low + rangeValue; // every bar closes either with high or low
UpdateBar(bars, bar.Open, newClose, bar.Low, newClose, time, 0, isRealtime);
AddBar(bars, close, close, close, close, time, volume, isRealtime);
}
else if (bars.Instrument.MasterInstrument.Compare(bar.High - rangeValue, close) > 0)
{
double newClose = bar.High - rangeValue; // every bar closes either with high or low
UpdateBar(bars, bar.Open, bar.High, newClose, newClose, time, 0, isRealtime);
AddBar(bars, close, close, close, close, time, volume, isRealtime);
}
else
UpdateBar(bars, open, (close > bar.High ? close : bar.High), (close < bar.Low ? close : bar.Low), close, time, volume, isRealtime);



RangeNoGap

if (bars.Instrument.MasterInstrument.Compare(close, bar.Low + rangeValue) > 0)
{
int NewBarCount = bars.Count - 2; bool isFirstNewBar = true;double newClose = bar.Low + rangeValue;
UpdateBar(bars, bar.Open, newClose, bar.Low, newClose, time, 0, isRealtime);double newBarOpen = newClose;
while (bars.Instrument.MasterInstrument.Compare(close, newClose) > 0)
{newClose = Math.Min(close, newBarOpen + rangeValue);

AddBar(bars, newBarOpen, newClose, newBarOpen, newClose, time, isFirstNewBar ? volume : 0, isRealtime);

newBarOpen = newClose;NewBarCount = bars.Count - 1;isFirstNewBar = false;
}
}
else if (bars.Instrument.MasterInstrument.Compare(bar.High - rangeValue, close) > 0)
{
int NewBarCount = bars.Count - 2;bool isFirstNewBar = true;double newClose = bar.High - rangeValue;
UpdateBar(bars, bar.Open, bar.High, newClose, newClose, time, 0, isRealtime);double newBarOpen = newClose;
while (bars.Instrument.MasterInstrument.Compare(newClose, close) > 0)
{
newClose = Math.Max(close, newBarOpen - rangeValue);

AddBar(bars, newBarOpen, newBarOpen, newClose, newClose, time, isFirstNewBar ? volume : 0, isRealtime);
newBarOpen = newClose;NewBarCount = bars.Count - 1;isFirstNewBar = false;
}
}
else
UpdateBar(bars, open, high, low, close, time, volume, isRealtime);

Reply With Quote
The following 4 users say Thank You to RJay for this post:
 
(login for full post details)
  #5 (permalink)
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,206 given, 4,332 received


RJay View Post
.... RangeNoGap has all the Updates that are in NT7's current Range bars. ...

@RJay

What is the difference between your RangeNoGap and the standard range bar that comes with NT?

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
 
(login for full post details)
  #6 (permalink)
Austin, TX
 
Experience: Master
Platform: ninjatrader, r-trader
Trading: NQ, CL
 
liquidcci's Avatar
 
Posts: 865 since Jun 2011
Thanks: 610 given, 1,070 received

I think the difference on these bars may be how the deal with the trading open. They may both do the same thing but I think range alt was an alternative bar from the regular range bar that controlled how bars printed on opening gap. Don't quote me on this as I may be wrong.

"The day I became a winning trader was the day it became boring. Daily losses no longer bother me and daily wins no longer excited me. Took years of pain and busting a few accounts before finally got my mind right. I survived the darkness within and now just chillax and let my black box do the work."
Reply With Quote
 
(login for full post details)
  #7 (permalink)
Las Vegas, NV
 
Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Trading: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,057 given, 5,841 received


ThatManFromTexas View Post
@RJay

What is the difference between your RangeNoGap and the standard range bar that comes with NT?

Here is a plot of Range, RangeNoGap, and RangeAlt side by side.

Attached Thumbnails
Click image for larger version

Name:	6E 06-12 (4 RangeAlt) _ 6E 06-12 (4 RangeNoGap) _ 6E 06-12 (4 Range)  5_8_2012.png
Views:	172
Size:	40.5 KB
ID:	72888  
Visit my futures io Trade Journal Started this thread Reply With Quote
The following 3 users say Thank You to aligator for this post:
 
(login for full post details)
  #8 (permalink)
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
 
RJay's Avatar
 
Posts: 688 since Jun 2009
Thanks: 747 given, 780 received


ThatManFromTexas View Post
@RJay

What is the difference between your RangeNoGap and the standard range bar that comes with NT?

Hi TMFT,


Code is virtually identical for both charts except for a few small differences.

There are no price gaps from bar body to bar body with RangeNoGap.

Range bars are programmed to have gaps

A 4 tick Range Bar can require 5 ticks to display a full 4 tick bar.
A 4 tick RangeNoGap only requires 4 ticks to display a full 4 tick bar.

RJay

Reply With Quote
The following user says Thank You to RJay for this post:
 
(login for full post details)
  #9 (permalink)
Erfurt Germany
 
Experience: Master
Platform: rtMagic, NinjaTrader
Broker: AMP/CQG, IAB
Trading: ES, 6E, FDAX, FGBL
 
Posts: 338 since Aug 2011
Thanks: 54 given, 461 received

RJay has realized a nice NoGap variant with using the "right" RangeSize for switch to th next bar.

While i well only using standard (with possible Gaps) variants, i use a simple logic to realize a variant for switch to the next bar to the next tick when the current tick is on the range border.

 
Code
PseudoCode:
if NextNewBarFlag then NextNewBarFlag=false; AddNewBar; exit;
if outside Range then AddNewBar; exit;
if equal Range then NextNewBarFlag=true;
UpdateBar;
exit;
The advantage of this is:
- its use only real traded prices and give nearly the same optical look comperable with the NoGap variant (its only need 4 ticks, when a Range 4 is selected)
- ~90% its give more as one price on the same level-> the next rangebar open exact and optical nice on the Close of bar before
- ~10% have Gaps, smaller Bars or dont close on the RangeBorder (optical is this not very nice, its shows exact the real live)
- with this logic its give only real traded prices, no zero volumes and/or additional ticks
- if needed its is simple to extend this "NextNewBarFlag" concept with a line for to check the HiLo size and add if not equal the range add one virtual price for realize a dummy tick that give the warranty any range nar has the same size (equal the range)...

I think with the simple NT7 variant, with RJay's 2 variants and this as 4. variant, we have its all combinations with a symetric fixed range period bars defined and differences between all this variants described

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > What is the difference between bar types RangeAlt and RangeNoGap?


Last Updated on May 8, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

New Challenge (TBD)

April
     



Copyright © 2021 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