EMA begin from chosen point in time - NinjaTrader | futures io social day trading
futures io futures trading


EMA begin from chosen point in time
Updated: Views / Replies:1,452 / 8
Created: by subterfuge Attachments:1

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
 

EMA begin from chosen point in time

  #1 (permalink)
Elite Member
uk
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: amp
Favorite Futures: ES
 
Posts: 164 since Aug 2009
Thanks: 102 given, 80 received

EMA begin from chosen point in time

Hi,

I have a feeling that my idea has already been done on here (but I can't seem to find it), so i'm hoping someone
can link me too it (assuming i'm correct)

I want a moving average indicator where I choose what bar the the indicator begins from.

So, if I was to take Fridays' CL chart, and decide I wanted my ema to begin from, 3pm, or 84 bars away, it
would look something like this:

cheers

Attached Thumbnails
EMA begin from chosen point in time-emcl.jpg  
Reply With Quote
 
  #2 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


subterfuge View Post
Hi,

I have a feeling that my idea has already been done on here (but I can't seem to find it), so i'm hoping someone
can link me too it (assuming i'm correct)

I want a moving average indicator where I choose what bar the the indicator begins from.

So, if I was to take Fridays' CL chart, and decide I wanted my ema to begin from, 3pm, or 84 bars away, it
would look something like this:

cheers


@subterfuge: Funny you selected an EMA to start with. The EMA is an infinite impulse response (IIR) filter, and it is therefore influenced by all of its prior values. In general IIR filters have training periods during which they do not show accurate results. The EMA is an exception as it only uses its value one bar ago. You can therefore create a specific anchored EMA for any bar on your chart.

Your concept can be implemented, you can also use a volume-weighted EMA with a large period. This would create a MIDAS variation that lets drop out part of the old information.

If you wish to take the MIDAS idea and use it with other moving averages this is also possible, as long as you apply it to finite impulse response (FIR) filters. You can recognize a FIR filter, as it does not use any recursive formulae, or explained in a different way, it does not use any of its prior value in the calculation for the current values. The SMA is a FIR filter and your idea would promote it to a TWAP on a time-based chart.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #3 (permalink)
 Vendor: www.probabletrades.com 
OC, California, USA
 
Futures Experience: Advanced
Platform: IB/TWS, NinjaTrader, thinkorswim
Favorite Futures: stocks, options, futures, VIX
 
shodson's Avatar
 
Posts: 1,859 since Jun 2009
Thanks: 480 given, 3,254 received



subterfuge View Post
Hi,

I have a feeling that my idea has already been done on here (but I can't seem to find it), so i'm hoping someone
can link me too it (assuming i'm correct)

I want a moving average indicator where I choose what bar the the indicator begins from.

So, if I was to take Fridays' CL chart, and decide I wanted my ema to begin from, 3pm, or 84 bars away, it
would look something like this:

cheers

I'm not sure I quite understand what you're looking for.

In your example are you looking to plot an EMA with a period of 84, and only show the EMA starting from the first bar in the series? Or, is it an EMA with a period of X to start plotting Y bars back, where X does not equal Y? And, do you want the starting bar to be a certain number of bars back or based on a starting time, like 3pm?

Reply With Quote
 
  #4 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,597 received
Forum Reputation: Legendary


shodson View Post
I'm not sure I quite understand what you're looking for.

In your example are you looking to plot an EMA with a period of 84, and only show the EMA starting from the first bar in the series? Or, is it an EMA with a period of X to start plotting Y bars back, where X does not equal Y? And, do you want the starting bar to be a certain number of bars back or based on a starting time, like 3pm?


I have thought about that as well. There are in fact several options.

(1) The first one is to use a fixed period for the EMA. Let us take the example of an EMA(15).

You would start with the close of the anchor point (high bar or low bar) and then calculate the following values by using the smoothing constant alpha = 2/(n+1) = 1/8. For the anchor bar the EMA would show the close of the anchor bar, the second and all consecutive values can be calculated as 0.875*Close[1] + 0.125*Close[0]. After some time this EMA would converge to the regular EMA(15).

The inconvenience of this approach is that the outcome depends on the selected period. There is not one such EMA that can be constructed from a high point or low point, but there is a whole collection of EMAs that can be built by using this method.

(2) You could also use a second concept and increase the period of the EMA with each bar. If we take Wilder's smoothing we obtain alpha = 1/n. For the first value we would get the Close[0], for the second bar 1/2*(Close[0] + Close[1]), for the third bar 2/3 * 1/2 (Close[2] + Close[1]) + 1/3 * Close[0] = 1/3(Close[2] + Close[1] + Close[0]) etc. This would be in fact the same result that we get, if we use a SMA with an increasing period. Used on minute bars we obtain our anchored time-weighted average price (TWAP).

(3) If we do not use Wilder's smoothing, but use the habitual smoothing alpha = 2/(n+1), then the result would look slightly different. Starting again with Close[0]., the value for the second bar would be 1/3 * Close[1] + 2/3 * Close[0], the value for the third bar would be 1/6 * Close[2] + 1/3 * Close[1] + 1/2 * Close[0], the fourth bar 1/10 * Close[3] + 1/5 * Close[2] + 3/10 * Close[1] + 2/5 * Close[0] etc. This is an average that tracks price closer than the TWAP like moving average explained under (2).

However, the logic of the original MIDAS concept is more appealing to me, as it relies on the volume-weighted average price, which I think is a better choice as a benchmark than the simple TWAP or a fantasy EMA.


Last edited by Fat Tails; July 8th, 2013 at 06:16 PM.
Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #5 (permalink)
Elite Member
uk
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: amp
Favorite Futures: ES
 
Posts: 164 since Aug 2009
Thanks: 102 given, 80 received


shodson View Post
I'm not sure I quite understand what you're looking for.

In your example are you looking to plot an EMA with a period of 84, and only show the EMA starting from the first bar in the series?

No. Although I can see how my example might have made things more confusing!



shodson View Post

Or, is it an EMA with a period of X to start plotting Y bars back, where X does not equal Y? ?

Yes. I think that is what I am talking about. The period isn't that important. Ideally is would be customizable, but a 20 ema for example would be fine.



shodson View Post
And, do you want the starting bar to be a certain number of bars back or based on a starting time, like 3pm

I want to choose what bar I want as the starting bar. It would be different every day.
It's almost like drawing a trendline. I want to look back at the chart and pick out a bar to begin my 'ema line'.

Hopefully that makes more sense.

Reply With Quote
 
  #6 (permalink)
Elite Member
uk
 
Futures Experience: Intermediate
Platform: ninja
Broker/Data: amp
Favorite Futures: ES
 
Posts: 164 since Aug 2009
Thanks: 102 given, 80 received


subterfuge View Post

Hopefully that makes more sense.

I guess that didn't make more sense then, lol.

Reply With Quote
 
  #7 (permalink)
Elite Member
Cedar Rapids, iowa
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Ninjatrader - Continuum
Favorite Futures: 6E, TF, 6J
 
Tasker_182's Avatar
 
Posts: 626 since Aug 2009
Thanks: 426 given, 1,126 received


subterfuge View Post
I guess that didn't make more sense then, lol.


In your example of a 20 ema there are two questions:

1) Are you saying you want to start calculating the 20 period ema beginning with a bar you specify (Understanding that it would not actually plot until 20 bars later)?

2) Or do you want the 20 ema to be plotted starting on a bar you specify (understanding that the 20 ema would actually begin calculating 20 bars before that point)?

"Money is better than poverty, if only for financial reasons." - Woody Allen
Reply With Quote
 
  #8 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,214 received

Look at this thread:

https://futures.io/ninjatrader-programming/4882-gapless-indicators.html

@Fat Tails has coded gapless indicators and shown how to reset the MA at the start of a session, you could apply this to any method you wish.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #9 (permalink)
Trading Apprentice
Nantes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Favorite Futures: CL
 
Posts: 2 since Dec 2016
Thanks: 1 given, 0 received

Hello @subterfuge

I am searching for this exact same indicator.
I will have a look at what Fat tails has coded.

Reply With Quote

Reply



futures io > > > > EMA begin from chosen point in time

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
How to plot the HH and LL and open lines for a (or two) chosen interval(s)? aligator NinjaTrader 5 March 28th, 2012 05:36 AM
As September Comes In, Investors Begin a Rough Month Quick Summary News and Current Events 0 August 29th, 2010 06:30 PM
Where do I begin learning to make an Indicator? markbbn Traders Hideout 7 July 5th, 2010 05:15 PM
Stephanie's journal ~ where to begin? tradersteph Elite Trading Journals 4 February 28th, 2010 01:06 PM
MACD: The 12-period (EMA) minus 26 EMA emini_Holy_Grail Traders Hideout 1 February 22nd, 2010 01:04 PM


All times are GMT -4. The time now is 10:33 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-10 in 0.15 seconds with 20 queries on phoenix via your IP 54.221.73.186