View Single Post
  #13 (permalink)  
Old 11-05-2006, 02:06 AM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow change color!

Quote:
Originally Posted by mikejody
Codersguru,

I want to thank you again for this indicator. I have backtested it for the previous 5 months, and am up over 2300 pips. It is excellent.

I do not understand code at all, am just a normal trader. Could you please explain when the indicator changes color? Looking at the chart the indicator changes red BEFORE every significant move down, and it turns green BEFORE every significant move up. But I can't imagine an indicator predicting the future like that. I imagine that during live trading the bar changes color after the move.

Is this correct?

Thank you again for this excellent indicator.
This is the code of changing the color of indicator:

PHP Code:
for(shift=limitshift>=0shift--)
   {
      if (
buffer[shift-1]>buffer[shift])
      {
         
UpBuffer[shift-1] = EMPTY_VALUE;
      }
      else if (
buffer[shift-1]<buffer[shift] )
      {
         
DownBuffer[shift-1] = EMPTY_VALUE;
      } 
      else
      {
         
UpBuffer[shift-1] = CLR_NONE;
         
DownBuffer[shift-1] = CLR_NONE;
      }
   } 
The code above means:
  • When the previous value of of Moving average is Greater than the current value change the color to red
  • And when the previous value of of Moving average is Lesser than the current value change the color to green
  • Or leave it yellow
That's all!
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote