NexusFi: Find Your Edge


Home Menu

 





Predicting a crossover or moving average for next bar


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Trader.Jon with 4 posts (8 thanks)
    2. looks_two Big Mike with 2 posts (1 thanks)
    3. looks_3 Richard with 1 posts (0 thanks)
    4. looks_4 Dragon with 1 posts (0 thanks)
      Best Posters
    1. looks_one zikonc with 4 thanks per post
    2. looks_two Trader.Jon with 2 thanks per post
    3. looks_3 WoodyFox with 1 thanks per post
    4. looks_4 Big Mike with 0.5 thanks per post
    1. trending_up 12,109 views
    2. thumb_up 14 thanks given
    3. group 6 followers
    1. forum 11 posts
    2. attach_file 1 attachments




 
Search this Thread

Predicting a crossover or moving average for next bar

  #1 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Gary (MTM) had a blog post I just stumbled on:
MA and EMA Crossover Prediction|Move the Markets

Basically the idea is to mathematically calculate a potential prediction for a moving average
""A couple articles in the February 2007 TAS&C caught me eye. One of them talked about a method to attempt to predict a simple moving average crossover the bar before it happens. Basically, they figure out what the price would have to be in the next bar, in order to make the MAs cross. Then, they compare the needed price to the current price. If the MAs would cross even if the stock remained unchanged in the next bar, they predict that it will happen.""

I think that it would be really useful when programmed with LinReg/HMA/Ehlers to anticipate where the price is moving: a useful filter or point of S/R.

Have a look: very interesting to see if anyone possibly already has this coded or could .. the math is in the blog post.

TJ

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
77 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
37 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
17 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657


Trader.Jon View Post
Gary (MTM) had a blog post I just stumbled on:
MA and EMA Crossover Prediction|Move the Markets

Basically the idea is to mathematically calculate a potential prediction for a moving average
""A couple articles in the February 2007 TAS&C caught me eye. One of them talked about a method to attempt to predict a simple moving average crossover the bar before it happens. Basically, they figure out what the price would have to be in the next bar, in order to make the MAs cross. Then, they compare the needed price to the current price. If the MAs would cross even if the stock remained unchanged in the next bar, they predict that it will happen.""

I think that it would be really useful when programmed with LinReg/HMA/Ehlers to anticipate where the price is moving: a useful filter or point of S/R.

Have a look: very interesting to see if anyone possibly already has this coded or could .. the math is in the blog post.

TJ

TJ,

This topic probably deserves its own thread, but I've been wanting to do this for a long time. There are numerous times (especially on a ranged bar chart) where it can be hugely beneficial to know the outcome of an indicator based on if the bar were to close High or Low (the only two possibilities).

Unfortunately, Richard is way smarter than me and I think there is little to no hope I could understand the math involved. So all I can do is hope that someone else writes the code in a way where I can port it to different moving average types.

But thanks very much for the link, I'm glad that others have considered this and found value in it!

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256



Big Mike View Post
TJ,

This topic probably deserves its own thread, but I've been wanting to do this for a long time. There are numerous times (especially on a ranged bar chart) where it can be hugely beneficial to know the outcome of an indicator based on if the bar were to close High or Low (the only two possibilities).

Unfortunately, Richard is way smarter than me and I think there is little to no hope I could understand the math involved. So all I can do is hope that someone else writes the code in a way where I can port it to different moving average types.

But thanks very much for the link, I'm glad that others have considered this and found value in it!

Mike

I think it would be go to have a thread to discuss possibilities in these kinds of indicators. From my knowledge, there are several approaches to making a predictive indicator:
- linear analysis like some kind of extrapolation technique
- probabilistic analysis - monte carlo?
- non linear applications - neural net, etc.
- some other exotic means

At least we can toss some ideas around.

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
  #4 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Big Mike View Post
TJ,

This topic probably deserves its own thread, but I've been wanting to do this for a long time. There are numerous times (especially on a ranged bar chart) where it can be hugely beneficial to know the outcome of an indicator based on if the bar were to close High or Low (the only two possibilities).

Unfortunately, Richard is way smarter than me and I think there is little to no hope I could understand the math involved. So all I can do is hope that someone else writes the code in a way where I can port it to different moving average types.

But thanks very much for the link, I'm glad that others have considered this and found value in it!

Mike

Mike,

If you feel this would be better served on its own thread please feel free to move the related posts there ... Im not smart enough to accomplish that with no caffein in my bloodstream ... lol

Jon

Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657


Trader.Jon View Post
Mike,

If you feel this would be better served on its own thread please feel free to move the related posts there ... Im not smart enough to accomplish that with no caffein in my bloodstream ... lol

Jon

Done, this is their new home

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 alex5000 
Sydney
 
Experience: Intermediate
Platform: Ninja Trader
Posts: 85 since Nov 2009
Thanks Given: 26
Thanks Received: 50

Mike will this be the home of the moving average cross over, next bar?

alex

Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284

For the range bar case in particular, you can give 100% accurate minimum and maximum bounds on an event, as described here:

RWT-006

... which to me makes it the most interesting case. There are times when your price indicators basically have no choice but to go somewhere within n-bars, because there is a strict bound on where price itself can go within n-bars. I think this is an under-utilized phenomenon in TA.

For the more general case, yes, you can do linear or nonlinear extrapolation, or inject energy into the system, or any number of other techniques... but be aware that this is what your "fancy" MA types already do (that's what makes them fancy!), so depending on what you are using you are likely just turning up the gain on their approach, and you won't be happy with the results.

Strangely enough, I've found that it's pretty hard to beat just assuming that price doesn't move anywhere in the next few bars (at least in terms of total squared error). Because... it usually doesn't! Price sits still and sits still, and then explodes to its next plateau in relatively few bars. As always, it pays to tailor your approach to the problem at hand... since if you are trying to identify the explosions it won't do at all to assume price never moves


[P.S. I don't mind being called Gary as long as you keep linking to my site ]

Reply With Quote
  #8 (permalink)
 
Dragon's Avatar
 Dragon 
Bellingham, WA
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: 6E, CL
Posts: 491 since Aug 2009
Thanks Given: 747
Thanks Received: 259

I couldn't resist. We must digress: Wiener process - Wikipedia, the free encyclopedia

Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
 zikonc 
san ramon
 
Experience: Beginner
Platform: ninja
Broker: zen
Trading: es, 6e
Posts: 136 since Oct 2009
Thanks Given: 98
Thanks Received: 76


Richard View Post
For the range bar case in particular, you can give 100% accurate minimum and maximum bounds on an event, as described here:

RWT-006

Thanks to Richard aka Gary

Attached Files
Elite Membership required to download: EMA_CROSS.cs
Reply With Quote
Thanked by:
  #10 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184



Dragon View Post
I couldn't resist. We must digress: Wiener process - Wikipedia, the free encyclopedia


and I couldn't resist the analogy ... quote from the above link :"" and note that it zooms in quadratically faster horizontally than vertically."" just like a lot of my trading experiences

Started this thread Reply With Quote
Thanked by:




Last Updated on September 16, 2019


© 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