Newbie question about ATR - NinjaTrader | futures io social day trading
futures io futures trading


Newbie question about ATR
Updated: Views / Replies:492 / 5
Created: by Schopenbauer 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
 

Newbie question about ATR

  #1 (permalink)
Trading Apprentice
Antwerp
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Nov 2014
Thanks: 0 given, 0 received

Newbie question about ATR

Hi,

I'm creating an indicator that calculates the 10 day ATR + 30 day ATR divided by 2.

However, when I apply it to my chart, it gives the ATR of the last 10 (30) sessions (minute bars).

How do I specify that I don't want it to be the last 10 (30) minute bars but rather the last 10 (30) day bars?

EDIT: this should actually be in the ninjascript subforum, can anyone move it please?

Kind regards


Last edited by Schopenbauer; November 11th, 2014 at 02:00 PM.
Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Durham, NC
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: ES, CL
 
Posts: 48 since Oct 2014
Thanks: 0 given, 20 received

Is your chart showing 30min bars?

Could you post some of your code?


You need to make sure the dataseries that the ATR is working on is set to Day.
So, either you need to make sure your chart is showing Days or add a new series in your indicator that establishes Day data.

Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Antwerp
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Nov 2014
Thanks: 0 given, 0 received



EnsoTrader View Post
Is your chart showing 30min bars?

Could you post some of your code?


You need to make sure the dataseries that the ATR is working on is set to Day.
So, either you need to make sure your chart is showing Days or add a new series in your indicator that establishes Day data.

So I have this code:

protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "A"));
Overlay = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
A.Set(0.10*(ATR(10)[0]+ATR(30)[0])/2);
}

And I want my chart to show minutes. How do I add a new series?

Reply With Quote
 
  #4 (permalink)
Elite Member
Hamburg
 
Futures Experience: None
Platform: NinjaTrader, TWS
Broker/Data: NinjaTraderBrokerage + Continuum, IB
Favorite Futures: Futures, Stocks
 
Posts: 7 since Jun 2014
Thanks: 2 given, 3 received

You have to calculate your indicator in secand dataseries (day data)

Try this:

 
Code
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "A"));
Add(PeriodType.Day, 1);
Overlay = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{

if (BarsInProgress == 1) 
{
A.Set(0.10*(ATR(10)[0]+ATR(30)[0])/2);
}

}

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Antwerp
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: ES
 
Posts: 3 since Nov 2014
Thanks: 0 given, 0 received


damerci View Post
You have to calculate your indicator in secand dataseries (day data)

Try this:

 
Code
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "A"));
Add(PeriodType.Day, 1);
Overlay = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{

if (BarsInProgress == 1) 
{
A.Set(0.10*(ATR(10)[0]+ATR(30)[0])/2);
}

}

This only shows the graph when I switch to day period, when I'm on minute period it doesn't show anything. Do I need to store the ATR value of each month or something?

I need to calculate the ATR values on the day series but want to use it in the minute series...

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Durham, NC
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: ES, CL
 
Posts: 48 since Oct 2014
Thanks: 0 given, 20 received

Try this:

 
Code
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "A"));
Add(PeriodType.Day, 1);
Overlay = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{

	if ( CurrentBars[1] < BarsRequired )
		return;
			
	A.Set( (ATR(BarsArray[1], 10)[0] + ATR(BarsArray[1], 30)[0]) / 2 );

}

Reply With Quote

Reply



futures io > > > > Newbie question about ATR

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
Newbie Ninja Trader Question Shooter7 NinjaTrader 4 January 11th, 2012 02:44 AM
newbie stupid question!!!! bugsbunny NinjaTrader Programming 29 February 10th, 2011 10:19 AM
Another CrossBelow/Above question from newbie Al2010 NinjaTrader Programming 3 December 4th, 2010 08:15 PM
Newbie Question about Forex jra_020883 Beginners and Introductions 5 March 8th, 2010 07:05 PM
ZN Newbie question NMTrader Traders Hideout 8 July 19th, 2009 10:59 PM


All times are GMT -4. The time now is 11:01 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.10 seconds with 19 queries on phoenix via your IP 54.145.16.43