NexusFi: Find Your Edge


Home Menu

 





Range Bars Queries


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one sr114 with 5 posts (0 thanks)
    2. looks_two Letmein with 2 posts (0 thanks)
    3. looks_3 bluevasp with 2 posts (0 thanks)
    4. looks_4 ab456 with 1 posts (2 thanks)
    1. trending_up 11,054 views
    2. thumb_up 3 thanks given
    3. group 6 followers
    1. forum 11 posts
    2. attach_file 2 attachments




 
Search this Thread

Range Bars Queries

  #1 (permalink)
sr114
Kolkata+India
 
Posts: 27 since Aug 2012
Thanks Given: 10
Thanks Received: 1

Hello

another query:

i generally use range bars in my trading intraday and my market is India (NSE-NIFTY). its price is between INR 5000+
now i use 500R for it.

Nifty Range bars- 500R


the code i use is

Quoting 
_SECTION_BEGIN( "Price" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
SetChartBkGradientFill( ParamColor( "Inner panel upper", colorBlack ), ParamColor( "Inner panel lower", colorBlack ) );
_N( Title = EncodeColor( colorWhite ) + StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

TimeFrameMode( 4 ); // turn on range bars where N is expressed in tick size
TimeFrameSet( 20 ); // range in tick size

SetBarFillColor( IIf( C > O, ParamColor( "Candle UP Color", colorGreen ), IIf( C <= O, ParamColor( "Candle Down Color", colorRed ), colorLightGrey ) ) );
Plot( C, "", IIf( C > O, ParamColor( "Wick UP Color", colorDarkGreen ), IIf( C <= O, ParamColor( "Wick Down Color", colorDarkRed ), colorLightGrey ) ), 64, 0, 0, 0, 0 );


a1=EMA(EMA(C,21),21); //DEMA of Close
a2=EMA(a1,21);
Difference=a1-a2;
a=a1+difference; //zerolag
Plot( A, "", colorWhite, styleLine, styleThick );


b1=EMA(EMA(C,8),8); //DEMA of Close
b2=EMA(b1,8);
Difference=b1-b2;
b=b1+difference; //zerolag
Plot( B, "", colorAqua, styleLine, styleThick );

_SECTION_END();

i am right in my analysis. i do not use and tick size in the symbol information - i keep it blank.

this is in case of bank nifty - Price - 10000+)



am i in right direction? waiting values response from forum
sr

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (permalink)
 Letmein 
London, UK
 
Posts: 36 since Jul 2012


sr114 View Post
i am right in my analysis. i do not use and tick size in the symbol information - i keep it blank.

this is in case of bank nifty - Price - 10000+)

?

Reply With Quote
  #3 (permalink)
 ab456 
New Delhi, India
 
Experience: Intermediate
Platform: SierraChart NinjaTrader,
Trading: ES,Stocks, Futures
Posts: 170 since Sep 2011
Thanks Given: 734
Thanks Received: 111



sr114 View Post
Hello

another query:

i generally use range bars in my trading intraday and my market is India (NSE-NIFTY). its price is between INR 5000+
now i use 500R for it.

Nifty Range bars- 500R


the code i use is


i am right in my analysis. i do not use and tick size in the symbol information - i keep it blank.

this is in case of bank nifty - Price - 10000+)



am i in right direction? waiting values response from forum
sr

Please try to be a bit more clear about what are you really asking ? What response do you want from the forum ? Exactly about what ?

Thanks

Reply With Quote
Thanked by:
  #4 (permalink)
sr114
Kolkata+India
 
Posts: 27 since Aug 2012
Thanks Given: 10
Thanks Received: 1


ab456 View Post
Please try to be a bit more clear about what are you really asking ? What response do you want from the forum ? Exactly about what ?

Thanks

as u see the scrip is behaving well in rb, but when i apply this afl for gold or silver in MCX, the bars are not that co- herent. for gold - i use 2750R (price - 30K) and for silver 5000R(silver price 54k+)?

is the afl used is right in implementing range bars and for gold and silver what will be the optimum ranges?

if the afl is not right then pls correct it. also can i combine the fractal based trend line along this afl

thanx and regards
sr

Reply With Quote
  #5 (permalink)
 Letmein 
London, UK
 
Posts: 36 since Jul 2012

Doing a quick look at your code it seems to be OK. But I did not test it.
Timeframeset (20) would mean to set to range bars of size of 20 ticks via AFL and not using range bar sizes set in tools-preferences-intraday.

In the information window of each symbol you can define the tick size of each smybol per data base. But you can also set ticksize in AFL. Ticksize set in AFL overrides ticksize set in according information window.

You can alternatively use Param function to set range bar size via parameters dialog (CTRL+R or mouse right-click on the chart) .

 
Code
_SECTION_BEGIN( "Price" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
SetChartBkGradientFill( ParamColor( "Inner panel upper", colorBlack ), ParamColor( "Inner panel lower", colorBlack ) );
_N( Title = EncodeColor( colorWhite ) + StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

rangesize = Param("Range bar size", 20, 1, 1000, 1);

TimeFrameMode( 4 ); // turn on range bars where N is expressed in tick size
TimeFrameSet( rangesize ); // range in tick size

SetBarFillColor( IIf( C > O, ParamColor( "Candle UP Color", colorGreen ), IIf( C <= O, ParamColor( "Candle Down Color", colorRed ), colorLightGrey ) ) );
Plot( C, "", IIf( C > O, ParamColor( "Wick UP Color", colorDarkGreen ), IIf( C <= O, ParamColor( "Wick Down Color", colorDarkRed ), colorLightGrey ) ), 64, 0, 0, 0, 0 );

a1=EMA(EMA(C,21),21); //DEMA of Close
a2=EMA(a1,21);
Difference=a1-a2;
a=a1+difference; //zerolag
Plot( A, "", colorWhite, styleLine, styleThick );

b1=EMA(EMA(C,8),8); //DEMA of Close
b2=EMA(b1,8);
Difference=b1-b2;
b=b1+difference; //zerolag
Plot( B, "", colorAqua, styleLine, styleThick );
_SECTION_END();
Keep in mind that to create proper range bars you need to use true tick data.

Reply With Quote
  #6 (permalink)
sr114
Kolkata+India
 
Posts: 27 since Aug 2012
Thanks Given: 10
Thanks Received: 1


Letmein View Post
Doing a quick look at your code it seems to be OK. But I did not test it.
Timeframeset (20) would mean to set to range bars of size of 20 ticks via AFL and not using range bar sizes set in tools-preferences-intraday.

In the information window of each symbol you can define the tick size of each smybol per data base. But you can also set ticksize in AFL. Ticksize set in AFL overrides ticksize set in according information window.

You can alternatively use Param function to set range bar size via parameters dialog (CTRL+R or mouse right-click on the chart) .

 
Code
_SECTION_BEGIN( "Price" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
SetChartBkGradientFill( ParamColor( "Inner panel upper", colorBlack ), ParamColor( "Inner panel lower", colorBlack ) );
_N( Title = EncodeColor( colorWhite ) + StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );

rangesize = Param("Range bar size", 20, 1, 1000, 1);

TimeFrameMode( 4 ); // turn on range bars where N is expressed in tick size
TimeFrameSet( rangesize ); // range in tick size

SetBarFillColor( IIf( C > O, ParamColor( "Candle UP Color", colorGreen ), IIf( C <= O, ParamColor( "Candle Down Color", colorRed ), colorLightGrey ) ) );
Plot( C, "", IIf( C > O, ParamColor( "Wick UP Color", colorDarkGreen ), IIf( C <= O, ParamColor( "Wick Down Color", colorDarkRed ), colorLightGrey ) ), 64, 0, 0, 0, 0 );

a1=EMA(EMA(C,21),21); //DEMA of Close
a2=EMA(a1,21);
Difference=a1-a2;
a=a1+difference; //zerolag
Plot( A, "", colorWhite, styleLine, styleThick );

b1=EMA(EMA(C,8),8); //DEMA of Close
b2=EMA(b1,8);
Difference=b1-b2;
b=b1+difference; //zerolag
Plot( B, "", colorAqua, styleLine, styleThick );
_SECTION_END();
Keep in mind that to create proper range bars you need to use true tick data.

Yes i am using tick data for generating the range bars. using the code u rectified - when i change the range via param, the tools-preferences-intraday range settings are used and not the range i am setting. is there any way to overcome this . or i have to go via the intraday settings ?

also can i combine fractal based trend line with this code for getingthe clear picture of price action?

thanx for the reply

sr

Reply With Quote
  #7 (permalink)
sr114
Kolkata+India
 
Posts: 27 since Aug 2012
Thanks Given: 10
Thanks Received: 1

Hello

pls require another help

MCX Silver - price 55000 and tick size is INR 1 - what will be the optimum range size if in symbol info i am using tick size = o and tick size = 0.05

MCX Gold - price 30300 tick size - INR 1 and the same condition for tick size - optimum range

MCX Crude Oli - range - INR 5500 , tick size - 1 INR, using tick size - 0.05, optimum range?

pls waiting for the reply

thanx and regards

sr

Reply With Quote
  #8 (permalink)
bluevasp
India India
 
Posts: 2 since Aug 2012
Thanks Given: 2
Thanks Received: 0


sr114 View Post
Yes i am using tick data for generating the range bars. using the code u rectified - when i change the range via param, the tools-preferences-intraday range settings are used and not the range i am setting. is there any way to overcome this . or i have to go via the intraday settings ?

also can i combine fractal based trend line with this code for getingthe clear picture of price action?

thanx for the reply

sr

hi

tick data?
name of the source?
ur charts do not look like tick data

Reply With Quote
  #9 (permalink)
sr114
Kolkata+India
 
Posts: 27 since Aug 2012
Thanks Given: 10
Thanks Received: 1


bluevasp View Post
hi

tick data?
name of the source?
ur charts do not look like tick data

source of tick data - terminal data capture utility.

cud u suggest a good and proper tick data provider.

also what is a pro[er tick data chart- - cud u provide some screen shots from ami and not from other charting sw.

sr

Reply With Quote
  #10 (permalink)
bluevasp
India India
 
Posts: 2 since Aug 2012
Thanks Given: 2
Thanks Received: 0



sr114 View Post
source of tick data - terminal data capture utility.

cud u suggest a good and proper tick data provider.

also what is a pro[er tick data chart- - cud u provide some screen shots from ami and not from other charting sw.

sr


eSignal - nifty 500R


img829.imageshack.us/img829/2722/nifty500r.png

img571.imageshack.us/img571/9384/nifty500r1.png

Reply With Quote




Last Updated on April 4, 2013


© 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