Forex



Go Back   Forex Trading > Trading systems > Ema Cross
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #31 (permalink)  
Old 11-06-2006, 04:00 PM
deepdrunk's Avatar
Senior Member
 
Join Date: Apr 2006
Posts: 312
deepdrunk is on a distinguished road
Code:
for(int shift=limit; shift>=0; shift--)
   {
       UpBuffer[shift] = buffer[shift];
       DownBuffer[shift] = buffer[shift];
       Buffer3[shift] = buffer[shift];
   }                   
   for(shift=limit; shift>=0; shift--)
   {
      if (buffer[shift+1]>buffer[shift])
      {
         UpBuffer[shift+1] = EMPTY_VALUE;
         //Buffer3[i+1] = EMPTY_VALUE;
      }
      else if (buffer[shift+1]<buffer[shift] )
      {
         DownBuffer[shift+1] = EMPTY_VALUE;
//Buffer3[i+1] = EMPTY_VALUE;      
      } 
      else
      {
         UpBuffer[shift+1] = CLR_NONE;
         DownBuffer[shift+1] = CLR_NONE;
      }
   }                   
   return(0);
only thing what is suspitios to me here is that 'shift';maybe it is the reason for repainting,cant we use it without shift ? like bar[1] bar[0] sorry but it is out of my mql4 knowledg.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #32 (permalink)  
Old 11-06-2006, 04:13 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Lightbulb shift is an INDICATOR itself!

Quote:
Originally Posted by deepdrunk
Code:
for(int shift=limit; shift>=0; shift--)
   {
       UpBuffer[shift] = buffer[shift];
       DownBuffer[shift] = buffer[shift];
       Buffer3[shift] = buffer[shift];
   }                   
   for(shift=limit; shift>=0; shift--)
   {
      if (buffer[shift+1]>buffer[shift])
      {
         UpBuffer[shift+1] = EMPTY_VALUE;
         //Buffer3[i+1] = EMPTY_VALUE;
      }
      else if (buffer[shift+1]<buffer[shift] )
      {
         DownBuffer[shift+1] = EMPTY_VALUE;
//Buffer3[i+1] = EMPTY_VALUE;      
      } 
      else
      {
         UpBuffer[shift+1] = CLR_NONE;
         DownBuffer[shift+1] = CLR_NONE;
      }
   }                   
   return(0);
only thing what is suspitios to me here is that 'shift';maybe it is the reason for repainting,cant we use it without shift ? like bar[1] bar[0] sorry but it is out of my mql4 knowledg.
Any indicator uses shift (which here is equal to limit and limit equal to Bars-counted_bars)
What does it mean:

In the first load of the indicator (not only my indicator but it's a general topic for any indicator wrote in MQL4,VT or EL) get the count of bars on chart and make the indicator calculation then draw the indicator.

afterwards, Everytime you get a new tick draw the new bar of indicator.
So, in the first load of the indicator limit will equal to the count of the bar and afterwards it will always be 0. So we using the current bar (Bar[0]) and the previous bar (Bar[1]).

This is another variation of the code and I think this is better (I'll update the indicator in xpworx.com)!

PHP Code:
for(int shift=0shift<limitshift++)
   {
       
UpBuffer[shift] = buffer[shift];
       
DownBuffer[shift] = buffer[shift];
       
Buffer3[shift] = buffer[shift];
   }                   
   for(
shift=0shift<limitshift++)
   {
      if (
buffer[shift]<buffer[shift+1])
      {
         
UpBuffer[shift] = EMPTY_VALUE;
      }
      else if (
buffer[shift]>buffer[shift+1] )
      {
         
DownBuffer[shift] = EMPTY_VALUE;
      } 
      else
      {
         
UpBuffer[shift] = CLR_NONE;
         
DownBuffer[shift] = CLR_NONE;
      }
   } 
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #33 (permalink)  
Old 11-06-2006, 04:26 PM
viat's Avatar
Member
 
Join Date: Sep 2005
Posts: 32
viat is on a distinguished road
HI there.
Off-coarse it will repaint past bars bcoz it's MA of "n" periods of bars. If you want nonrepaint one just put MA period value to 1!
Thank you Codersguru for your amazing work.

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #34 (permalink)  
Old 11-06-2006, 04:36 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Unhappy

Quote:
Originally Posted by viat
HI there.
Off-coarse it will repaint past bars bcoz it's MA of "n" periods of bars. If you want nonrepaint one just put MA period value to 1!
Thank you Codersguru for your amazing work.

Cheers
Thanks viat!

You are right! There's no indicator that's not repaint (calculating) the past!

But repainting the past they meant is "An indicator that changes the drawing he made in the past" or they meant "An indicator that calculate the future if the past (-1 index indicator)". or they mean "It's too bad to share your indicator, or you share it because it's bad"!

Anyway, It's a moving average indicator that colored itself according too the value of the previous bar! if this means it repaint the past I'll remove it from my site and close the thread! if it does not repaint the past I'll remove it too from my site but I'll not close the thread! kidding!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #35 (permalink)  
Old 11-06-2006, 05:01 PM
Senior Member
 
Join Date: Dec 2005
Posts: 294
mikejody is on a distinguished road
Codersguru, I am not at all accusing you of maliciously making an indicator, but you need to warn people about this indicator, that it DOES repaint in the past.

For instance, all you need to do is look at a 1M time frame and watch the color of the indicator BEFORE the previous bar (and in some cases before the previous 2 bars) change color. This makes it impossible to backtest, and not a good indicator to trade live.

Afterall, let's say you are in a trade short, and then the indicator changes BEFORE your current bar to green (long) indicating that you SHOULD have gone long before the open of the bar. This is impossible to do.

Again I say, watch your 1M timeframe and watch how the indicator CHANGES COLOR in PREVIOUS bars.

Quote:
Originally Posted by codersguru
Hi there!

1- I don't know what's going on! I'm sharing all of my works and didn't cheat one of you before! Any member here denies that???

2- Xp moving average is Colored Moving Average no less no more! So, if the moving averages indicators repaint the past (I'm sure they are not) then xpMA repaints the past.

The logic of coloring is very simple:

1- If the previous bar value is Greaterthan the current bar value color the moving average is Green.
2- If the previous bar value is Lesser than the current bar value color the moving average is Red.
3-If the previous bar value is Equal to the current bar value color the moving average is Yellow.

Repainting the past or repainting the future:
I want to mention another thing here. Repainting the past means repainting the future for the history!
I mean, I can write an indicator that looks for the next bar value which it exist only in the past (because in the current bar there's no next bar yet) That's the meaning of repainting the past I think!

Well, The answer is: XP Moving Average does not repaint the past!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #36 (permalink)  
Old 11-06-2006, 05:07 PM
Senior Member
 
Join Date: Dec 2005
Posts: 294
mikejody is on a distinguished road
Codersguru, are you a trader or merely a coder? If merely a coder, I am sure this indicator is very helpful for all kinds of things that coders do. If you are a trader, would you please tell us how you trade this indicator?

And specifically, what do you do if you are in a long trade and the indicator changes color 2 bars behind you? Do you quickly reverse position? Or do you stay in the trade hoping the indicator will change back according to price movement?

I'm very interested in knowing how someone would trade with an indicator that changes color in previous bars.

Also, how does one backtest using this indicator? I mean, I am sure I could develop an indicator that looks back 50 bars and changes all the previous bars to red when the market was sinking, and all the previous bars to green when the market was climbing.

Then I could release the indicator and people would look at it, backtest it, and think they had the holy grail. Problem is, I would sooner or later have to explain to them that indicators that change the colors previously are no good in backtesting, and not much good in live trading.

Please, help me understand how you actually trade with this indicator.

Quote:
Originally Posted by codersguru
Thanks viat!

You are right! There's no indicator that's not repaint (calculating) the past!

But repainting the past they meant is "An indicator that changes the drawing he made in the past" or they meant "An indicator that calculate the future if the past (-1 index indicator)". or they mean "It's too bad to share your indicator, or you share it because it's bad"!

Anyway, It's a moving average indicator that colored itself according too the value of the previous bar! if this means it repaint the past I'll remove it from my site and close the thread! if it does not repaint the past I'll remove it too from my site but I'll not close the thread! kidding!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #37 (permalink)  
Old 11-06-2006, 05:52 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Unhappy

Quote:
Originally Posted by mikejody
Codersguru, are you a trader or merely a coder? If merely a coder, I am sure this indicator is very helpful for all kinds of things that coders do. If you are a trader, would you please tell us how you trade this indicator?

And specifically, what do you do if you are in a long trade and the indicator changes color 2 bars behind you? Do you quickly reverse position? Or do you stay in the trade hoping the indicator will change back according to price movement?

I'm very interested in knowing how someone would trade with an indicator that changes color in previous bars.

Also, how does one backtest using this indicator? I mean, I am sure I could develop an indicator that looks back 50 bars and changes all the previous bars to red when the market was sinking, and all the previous bars to green when the market was climbing.

Then I could release the indicator and people would look at it, backtest it, and think they had the holy grail. Problem is, I would sooner or later have to explain to them that indicators that change the colors previously are no good in backtesting, and not much good in live trading.

Please, help me understand how you actually trade with this indicator.
It does not repaint the past!

Note: To be sure we are using the same version of the indicator please go to:
XP Moving Average v2
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #38 (permalink)  
Old 11-06-2006, 06:01 PM
viat's Avatar
Member
 
Join Date: Sep 2005
Posts: 32
viat is on a distinguished road
Quote:
Originally Posted by mikejody
Codersguru, are you a trader or merely a coder? If merely a coder, I am sure this indicator is very helpful for all kinds of things that coders do. If you are a trader, would you please tell us how you trade this indicator?

And specifically, what do you do if you are in a long trade and the indicator changes color 2 bars behind you? Do you quickly reverse position? Or do you stay in the trade hoping the indicator will change back according to price movement?

I'm very interested in knowing how someone would trade with an indicator that changes color in previous bars.

Also, how does one backtest using this indicator? I mean, I am sure I could develop an indicator that looks back 50 bars and changes all the previous bars to red when the market was sinking, and all the previous bars to green when the market was climbing.

Then I could release the indicator and people would look at it, backtest it, and think they had the holy grail. Problem is, I would sooner or later have to explain to them that indicators that change the colors previously are no good in backtesting, and not much good in live trading.

Please, help me understand how you actually trade with this indicator.
Hi mikejody.
Read post#33 please. Then if you don't understand how MA's works just Google it. If you want to trade only using 1 MA try E/E on slope change. But I think you need more than one indicator for good E/E.
XPMA works like usual MA but have had better visual effect.
Hope this help.

viat
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #39 (permalink)  
Old 11-06-2006, 06:21 PM
Senior Member
 
Join Date: Dec 2005
Posts: 294
mikejody is on a distinguished road
If you look right now on Cable 1M, the 2018 GMT bar is at 1.8967, and there are 3 previous bars of red indicator. However, when the price goes to 1.8968 or higher, the indicator 2 BARS PREVIOUSLY changes color from red to yellow.

That is, the bar at 2017, the PREVIOUS bar's indicator, turns color from red to yellow. THIS is what we all mean by "repainting the past." In other words, you are in this trade short right now, but when the price goes up one tick the indicator makes it look like you should have been OUT of the trade at least 1-2 bars EARLIER.

Why is this so difficult to understand?

Quote:
Originally Posted by codersguru
It does not repaint the past!

Note: To be sure we are using the same version of the indicator please go to:
XP Moving Average v2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #40 (permalink)  
Old 11-06-2006, 06:50 PM
fxnewbie's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 495
fxnewbie is on a distinguished road
The way i am using it

The way i am using this indicator:
I am placing in 30 min. chart:
- XP MA 4
- XP MA 20
- XP MA 90
For entries, i wait until all XP MAs changes at the same collor
For exits, i wait until XP MA 20 changes his collor, but the change of XP MA 4 means a warning signal.
I am just starting to test indicator that way. So far, with good results.

THANKS, CODERSGURU !!!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
moving average, moving average forex, xpMA EA, forex, XP Moving Average, forex moving average, T3 Moving Average, xpma.mq4, xpmaea, vidya mq4, moving averages, moving average indicator, moving averages forex, average forex, xp ma, xpma indicator, xp ema, vidya, vidya moving average, moving average indicators


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving Average RSI xcooper Metatrader 4 27 09-12-2009 10:05 PM
How to calculate Moving Average of a Moving Average babarmughal Expert Advisors - Metatrader 4 4 05-31-2009 03:05 PM
EA Moving Average rodrigokaus Expert Advisors - Metatrader 4 10 02-11-2009 08:45 AM
non lag moving average kidhudi Indicators - Metatrader 4 1 07-26-2006 01:52 PM
moving average danu Expert Advisors - Metatrader 4 1 05-31-2006 05:23 AM


All times are GMT. The time now is 10:44 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.