NexusFi: Find Your Edge


Home Menu

 





Help for chart based ATR price...


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one wldman with 15 posts (0 thanks)
    2. looks_two Fat Tails with 6 posts (2 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 9,391 views
    2. thumb_up 5 thanks given
    3. group 5 followers
    1. forum 24 posts
    2. attach_file 4 attachments




 
Search this Thread

Help for chart based ATR price...

  #1 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556

targets displayed as bands above and below price action.

I have numerous indicators and methods that I would like to port over to NT but my programing attributes are disgracfully bad.

The idea would be to start simple and small with both my learning and in trying to find "help". I definetly do not want something for nothing and I believe that some of these ideas would help new and experienced people.

The ATR target is very simple in form and formula. It would be easy to code and easy for anyone to apply or evaluate.

Does anyone want to give this project a whirl? DB

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


Do you want to plot an ATR target based on an actual entry, or do you look for a band that plots at a distance of n ATRs from price, a moving average or a moving median?I

f the latter is the case you could have a look at the following indicators

-> Keltner Channels
-> Universal Keltner Channels
-> TS SuperTrend, SuperTrend M1
-> Chandelier Stop

If you want to use the ATR as a profit target based on an actual entry, you would need to code a strategy.

Reply With Quote
  #4 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556

2011-06-07_1027 - wilddan's library

This is a screen shot that includes a version of what I am talking about. The dashed purple and dashed green lines are 3 times the 34 period atr. The outer grey line is 4.23 times the 34 period atr. I also ploted a 2.618 times the 34 peratr. Perfect would be a set of bands where the atr multiple expands or contracts based on price volatility. I never figured that out but felt that I was close.

I have the script (two versions) in another platforms language They are both very similar to tradestation easy language.

The chart represents a hierarchy of non-colinears that was designed to trade price pressure. Some of the work is my own. Some is adapted from the work of others and some is the result of a colaboration here in Chicago. I would need to ask before sharing the colaborative effort here, but since that work is posted publically elsewhere I do not think it will be an issue.

Fat Tails let me know if you care to assist with the programing. I would be happy to share the details of trade set ups here. Some will find it valuable others will offer helpful ideas for improvment.

Other screen shots available.

Thanks again for the response. DB

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556

2011-06-01_0603 - wilddan's library

without trigger mechanism, just primary exit at the dashed lines

2011-05-24_1052 - wilddan's library

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #6 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


wldman View Post
2011-06-07_1027 - wilddan's library

This is a screen shot that includes a version of what I am talking about. The dashed purple and dashed green lines are 3 times the 34 period atr. The outer grey line is 4.23 times the 34 period atr. I also ploted a 2.618 times the 34 peratr. Perfect would be a set of bands where the atr multiple expands or contracts based on price volatility. I never figured that out but felt that I was close.

I have the script (two versions) in another platforms language They are both very similar to tradestation easy language.

The chart represents a hierarchy of non-colinears that was designed to trade price pressure. Some of the work is my own. Some is adapted from the work of others and some is the result of a colaboration here in Chicago. I would need to ask before sharing the colaborative effort here, but since that work is posted publically elsewhere I do not think it will be an issue.

Fat Tails let me know if you care to assist with the programing. I would be happy to share the details of trade set ups here. Some will find it valuable others will offer helpful ideas for improvment.

Other screen shots available.

Thanks again for the response. DB

Just looks like multiple Keltner Channels around a moving average. You can build the bands applying the Universal Keltner Channels several times.

Reply With Quote
Thanked by:
  #7 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556

is it Fat Tails. That does look similar but I can't see direct comparison. I would be suprised or maybe not that much to have tried to create something that was easily available. There are a few things with how Keltners calc is a little different I think.

After I make my number, I will type out the code in a post. Maybe we can compare it to Keltner. What I was really looking for was a variable that would increase or decrease the band distance based on some, maybe the same, volatility condition.

I use this as first of a tertiary exit method.

Thanks for the response and the input.

DB

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #8 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556

to make my number today. Here is the other code for what I am describing. If it that simple as to be multiple iterations of Keltner, I'd have a good laugh at that.


input: length(34), trlength(34), upband(purple),dwband(green), proximity(.03), alert(false);

Initialize variables on first bar

if (barnumber==barsback)
{
xma=0;
travg=0;
upband1=0;
upband2=0;
upband3=0;
upband4=0;
lband1=0;
lband2=0;
lband3=0;
lband4=0;
}

xma=xaverage(close, length);
plot1=xma;color1=background_color;

range=TrueRange();
travg=xaverage(range, trlength);

uband2=xma + 2.618*travg;
uband3=xma+3*travg;

lband2=xma-2.618*travg;
lband3=xma-3*travg;

plot2=uband2;style2=ps_dot;
plot3=uband3;
color2,color3=upband;

plot4=lband2;style4=ps_dot;
plot5=lband3;
color4,color5=dwband;

then there are alerts but the meat is above.

DB

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #9 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

@widman : Just having a quick look at the code.

Input has two periods, one for the moving average, one for the average true range. The standard Keltner Channels use the same period for both, the Universal Keltner Channel (Downloads) allows for two different periods. As both periods are set to 34, the default Keltner Channel would do.

The XAverage function of TradeStation is an EMA. The default Keltner Channel uses a SMA, so you cannot use the default Keltner Channel. Therefore you need to take the Universal Keltner Channel and set it to EMA/EMA, as both moving average and the average true range use exponential moving averages.

Attached is a 3-min chart for ES with the bands applied and multipliers set to 2.618 and 3.0. I noticed that you use different multipliers in your set up.

Attached Thumbnails
Click image for larger version

Name:	ES 09-11 (3 Min)  07_09_2011.jpg
Views:	266
Size:	93.9 KB
ID:	48668  
Reply With Quote
Thanked by:
  #10 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,534 since Aug 2011
Thanks Given: 2,069
Thanks Received: 9,556


I am going to work on that a bit and study what you are telling me Fat Tails. The display does not have the same look so I'll review the math. The lines in your example ate 3 times and 2.618 times the 34 period average true range. That script I posted defines Keltner Channel?

Thanks for your help and suggestions. DB

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on September 8, 2011


© 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