Projecting a Moving Average - NinjaTrader | futures io social day trading
futures io futures trading


Projecting a Moving Average
Updated: Views / Replies:7,359 / 30
Created: by vegasfoster Attachments:7

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
 7  
 
Thread Tools Search this Thread
 

Projecting a Moving Average

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


ehlaban View Post
You can easily extend a moving average with overriding the Plot() method.
There are some examples and indicators build with it from NT.

Another method

https://futures.io/ninjatrader/16683-future-plot-ninjatrader.html#post181458

This is certainly a better approach to to plot into the future. Thanks again for mentioning it here.

Reply With Quote
 
  #22 (permalink)
Membership Revoked
los angeles
 
Futures Experience: Intermediate
Platform: nt
Favorite Futures: cl
 
Sunil P's Avatar
 
Posts: 292 since Jan 2012
Thanks: 427 given, 175 received

Fats you need to start your own vendor/shop....you will clean house.

Reply With Quote
 
  #23 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary


As you know, there is a perfect solution to project future value of any indicator at the close of the bar for fixed size price bars, like range bars.

Reply With Quote
 
  #24 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received

Thanks Fat Tails, I'm actually doing this in SC, but there is nobody to answer SC programming questions, so I ask for c# and then translate to c++. SC doesn't plot the same as NT, but you have put me on the right track and I am finally making progress on this.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
  #25 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received


aligator View Post
As you know, there is a perfect solution to project future value of any indicator at the close of the bar for fixed size price bars, like range bars.

You are assuming range bars are always the perfect solution, trust me, there are applications where they are not.

Reply With Quote
 
  #26 (permalink)
Market Wizard
Las Vegas, NV
 
Futures Experience: Advanced
Platform: Abacus, Slide Rule, HP-65, Metastock, TOS, NT
Favorite Futures: Futures
 
aligator's Avatar
 
Posts: 3,424 since Aug 2010
Thanks: 1,053 given, 5,822 received
Forum Reputation: Legendary


vegasfoster View Post
You are assuming range bars are always the perfect solution, trust me, there are applications where they are not.

Not at all...

Reply With Quote
 
  #27 (permalink)
Elite Member
Charlottetown, Prince Edward Island
 
Futures Experience: Advanced
Platform: Ninja
Broker/Data: Optimus - Rithmic
Favorite Futures: GC
 
WolfieWolf's Avatar
 
Posts: 232 since Jul 2010
Thanks: 100 given, 273 received

Black Magic

Fat Tails,

This really is black magic and I like it! I've been attempting to build on your sample ana3barPredictor by creating an indicator that calls an instance of MACD for the Line and Average using [-1] for the input:

Line.Set(MACD_DiNapoli(ZLEMA(3), fast,slow,smooth).Value[-1]);
Avg.Set(MACD_DiNapoli(ZLEMA(3), fast,slow,smooth).Avg[-1]);

While this works incredibly well I haven't got a clue how it works; I can't seem to find any documentation on what [-1] represents or what it is actually doing? I also have one small issue. The calling indicator (above) is getting the values of the MACD_DiNapoli as if COBC=false. In order to make this work at all I had to set COBC=false in the MACD_DiNapoli but I want it to be true. If I set it to true in the nested indicator I get no output at all. Is there any way that I can force COBC=true in the nested indicator or at least force the calling indicator to use COBC=true for the nested values?

Hopefully this makes sense?

Thanks for any assistance you can offer

Kind Regards

Wolfie

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


WolfieWolf View Post
Fat Tails,

This really is black magic and I like it! I've been attempting to build on your sample ana3barPredictor by creating an indicator that calls an instance of MACD for the Line and Average using [-1] for the input:

Line.Set(MACD_DiNapoli(ZLEMA(3), fast,slow,smooth).Value[-1]);
Avg.Set(MACD_DiNapoli(ZLEMA(3), fast,slow,smooth).Avg[-1]);

While this works incredibly well I haven't got a clue how it works; I can't seem to find any documentation on what [-1] represents or what it is actually doing? I also have one small issue. The calling indicator (above) is getting the values of the MACD_DiNapoli as if COBC=false. In order to make this work at all I had to set COBC=false in the MACD_DiNapoli but I want it to be true. If I set it to true in the nested indicator I get no output at all. Is there any way that I can force COBC=true in the nested indicator or at least force the calling indicator to use COBC=true for the nested values?

Hopefully this makes sense?

Thanks for any assistance you can offer

Kind Regards

Wolfie

@WolfieWolf: The term Value[-1] does not always exist, so it may well throw an exception. An essential ingredient of my little indicator were the try{} catch{} brackets in order to limit the damage in case that there was no such thing as Value[-1]. Also note that I had asked to displace the indicator that calls the ana3BarPredictor. The displacement compensates for the negative input values for all but the last few bars.

What do you try to achieve?

Joe DiNapoli has used displaced moving averages and other indicators, but his indicators had an additional lag introduced, which would be the opposite of the ability to shift indicator plots forward.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #29 (permalink)
Elite Member
Charlottetown, Prince Edward Island
 
Futures Experience: Advanced
Platform: Ninja
Broker/Data: Optimus - Rithmic
Favorite Futures: GC
 
WolfieWolf's Avatar
 
Posts: 232 since Jul 2010
Thanks: 100 given, 273 received

Fat Tails,

Thanks for the quick response. To answer your question, "What am I trying to achieve".. I've developed an automated Ninja Strategy based on a simple MACD crossover. It doesn't have to be the DiNapoli MACD, the standard one will do. My signals are quite good but they are, IMHO lagging by one bar; if I could get my signal one bar earlier I would have much better entries and exits. In some cases turning a loser into a B/E and good winners into exceptional ones, etc. So I was attempting to "predict" the MACD values of the next bar so my strategy could execute one bar early. What I have found, however, is that there is a difference between the values of this predictive code real-time vs historic and I can't figure out what's going on. If I do a replay, displaying the indicator on the chart, and then refresh the scripts, the values change. The historic values are exactly what I want, in real time. In a lot of cases the crossovers are much too early, real time. My early assumption was that the [-1] code was using intra-bar data, and not the close of bar data, but now I'm not sure. Any ideas?

Thanks again - you don't realize how much you have helped me just through your participation / involvement in this forum.

Kind Regards

Wolfie

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



WolfieWolf View Post
Fat Tails,

Thanks for the quick response. To answer your question, "What am I trying to achieve".. I've developed an automated Ninja Strategy based on a simple MACD crossover. It doesn't have to be the DiNapoli MACD, the standard one will do. My signals are quite good but they are, IMHO lagging by one bar; if I could get my signal one bar earlier I would have much better entries and exits. In some cases turning a loser into a B/E and good winners into exceptional ones, etc. So I was attempting to "predict" the MACD values of the next bar so my strategy could execute one bar early. What I have found, however, is that there is a difference between the values of this predictive code real-time vs historic and I can't figure out what's going on. If I do a replay, displaying the indicator on the chart, and then refresh the scripts, the values change. The historic values are exactly what I want, in real time. In a lot of cases the crossovers are much too early, real time. My early assumption was that the [-1] code was using intra-bar data, and not the close of bar data, but now I'm not sure. Any ideas?

Thanks again - you don't realize how much you have helped me just through your participation / involvement in this forum.

Kind Regards

Wolfie

You should not be astonished that predictions do not match historical data. Predictions are always false, nothing can be predicted. A prediction is always based on an underlying assumption such as

-> price does not move during the period for which the prediction is made (no feedback)
-> price continues its way in the direction of the prior move (positive feedback)
-> price reverses back to the mean (negative feedback)

Of course nobody knows which of the assumptions is correct, and therefore all predictions hava a high probability of being flawed. That is the reason that I never have used them, except for fun.

If you base your signal on a prediction, your signal will come earlier, but you cannot be sure that the signal will be generated as predicted. In the end you do not gain anything.

Reply With Quote

Reply



futures io > > > > Projecting a Moving Average

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Moving Average sharmas Elite Automated Trading 62 April 9th, 2012 07:44 PM
Moving Average x distance away flight302 NinjaTrader Programming 2 March 26th, 2012 03:23 PM
Moving Average Kush NinjaTrader Programming 5 November 6th, 2011 01:49 PM
Moving average Help yiman NinjaTrader Programming 4 July 29th, 2011 09:03 AM
New Moving Average arnaudlx The Elite Circle 10 January 28th, 2011 06:15 AM


All times are GMT -4. The time now is 04:37 AM.

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-14 in 0.17 seconds with 40 queries on phoenix via your IP 54.91.38.173