# XP Moving Average! - page 2

518

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.

codersguru:
Settings details are here: http://www.xpworx.com/XP
23547

change color!

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:

for(shift=limit; shift>=0; shift--)

{

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!
518

OK, yes, that makes sense now; I am wondering if it would be possible for you to change the indicator to color the bar, instead of the indicator, when the conditions are met.

I am attaching a chart; I am wondering if you can color the 4th bar from the right green.

Do you see the long signal generated right before the 4th bar? It would be very good if the 4th bar itself could be colored green as an indicator to go long.

Is this possible to do?

codersguru:
This is the code of changing the color of indicator:
for(shift=limit; shift>=0; shift--)

{

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!
Files:
xpma1.gif 26 kb
1389

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.

What settings did you use, and how do I backtest an indicator? Is there an EA out there?

Thanks,

ET

18

Nice

I have read this new thread with interest. Thanks for sharing this indicator with us. I look forward to posting my transaction after testing the indicator live with the new settings.

Tyme2jam

10

Hi CodersGuru

Is it possible to put the color of the indicator to a variable, like you did for the "LSMA in Color" indicator?

PS I'm really awed by the stuff you create, thank you.

518

34

2

0

0.8

Just put the indicator on a 4 hour Cable chart and watch the pips rack up.

et_phonehome_2:
What settings did you use, and how do I backtest an indicator? Is there an EA out there?

Thanks,

ET
938

mikejody:
OK, yes, that makes sense now; I am wondering if it would be possible for you to change the indicator to color the bar, instead of the indicator, when the conditions are met.

I am attaching a chart; I am wondering if you can color the 4th bar from the right green.

Do you see the long signal generated right before the 4th bar? It would be very good if the 4th bar itself could be colored green as an indicator to go long.

Is this possible to do?

Hi mikejody,

what kind of indicator is this...???

thanks

518

Hi babarmughal,

This is a moving average indicator, combined with an excellent filter which significantly reduces whipsaw. This is, to date, the best trend indicator I have ever seen.

Here are the results for the past 15 months Cable 4 hour, taking every signal. Have you ever seen a trend following indicator produce nearly 70% profitable trade with such low drawdown? This is truly amazing!

=============================================================================================

EQUITY TABLE

=============================================================================================

Trade PL/Cntr Risk/Cntr No param Contracts Pos PL Equity

1. -1.00 NA NA 1 -1.00 9,999.00

2. 12.00 NA NA 1 12.00 10,011.00

3. 0.00 NA NA 1 0.00 10,011.00

4. 196.00 NA NA 1 196.00 10,207.00

5. 3.00 NA NA 1 3.00 10,210.00

6. 27.00 NA NA 1 27.00 10,237.00

7. 6.00 NA NA 1 6.00 10,243.00

8. -5.00 NA NA 1 -5.00 10,238.00

9. 270.00 NA NA 1 270.00 10,508.00

10. 177.00 NA NA 1 177.00 10,685.00

11. -46.00 NA NA 1 -46.00 10,639.00

12. -24.00 NA NA 1 -24.00 10,615.00

13. 117.00 NA NA 1 117.00 10,732.00

14. 0.00 NA NA 1 0.00 10,732.00

15. 156.00 NA NA 1 156.00 10,888.00

16. 1.00 NA NA 1 1.00 10,889.00

17. -33.00 NA NA 1 -33.00 10,856.00

18. 8.00 NA NA 1 8.00 10,864.00

19. 35.00 NA NA 1 35.00 10,899.00

20. 8.00 NA NA 1 8.00 10,907.00

21. 10.00 NA NA 1 10.00 10,917.00

22. 32.00 NA NA 1 32.00 10,949.00

23. 8.00 NA NA 1 8.00 10,957.00

24. 66.00 NA NA 1 66.00 11,023.00

25. 6.00 NA NA 1 6.00 11,029.00

26. 3.00 NA NA 1 3.00 11,032.00

27. 73.00 NA NA 1 73.00 11,105.00

28. 19.00 NA NA 1 19.00 11,124.00

29. 0.00 NA NA 1 0.00 11,124.00

30. 155.00 NA NA 1 155.00 11,279.00

31. 86.00 NA NA 1 86.00 11,365.00

32. 6.00 NA NA 1 6.00 11,371.00

33. 512.00 NA NA 1 512.00 11,883.00

34. -17.00 NA NA 1 -17.00 11,866.00

35. 226.00 NA NA 1 226.00 12,092.00

36. 9.00 NA NA 1 9.00 12,101.00

37. 190.00 NA NA 1 190.00 12,291.00

38. 52.00 NA NA 1 52.00 12,343.00

39. 194.00 NA NA 1 194.00 12,537.00

40. -10.00 NA NA 1 -10.00 12,527.00

41. -14.00 NA NA 1 -14.00 12,513.00

42. 214.00 NA NA 1 214.00 12,727.00

43. 28.00 NA NA 1 28.00 12,755.00

44. -89.00 NA NA 1 -89.00 12,666.00

45. 12.00 NA NA 1 12.00 12,678.00

46. 200.00 NA NA 1 200.00 12,878.00

47. -3.00 NA NA 1 -3.00 12,875.00

48. -4.00 NA NA 1 -4.00 12,871.00

49. -18.00 NA NA 1 -18.00 12,853.00

50. 7.00 NA NA 1 7.00 12,860.00

51. 4.00 NA NA 1 4.00 12,864.00

52. 22.00 NA NA 1 22.00 12,886.00

53. 110.00 NA NA 1 110.00 12,996.00

54. 32.00 NA NA 1 32.00 13,028.00

55. -3.00 NA NA 1 -3.00 13,025.00

56. -1.00 NA NA 1 -1.00 13,024.00

57. 16.00 NA NA 1 16.00 13,040.00

58. 24.00 NA NA 1 24.00 13,064.00

59. 45.00 NA NA 1 45.00 13,109.00

60. 2.00 NA NA 1 2.00 13,111.00

61. -10.00 NA NA 1 -10.00 13,101.00

62. 62.00 NA NA 1 62.00 13,163.00

63. -18.00 NA NA 1 -18.00 13,145.00

64. 1,370.00 NA NA 1 1,370.00 14,515.00

65. -52.00 NA NA 1 -52.00 14,463.00

66. 16.00 NA NA 1 16.00 14,479.00

67. -29.00 NA NA 1 -29.00 14,450.00

68. 19.00 NA NA 1 19.00 14,469.00

69. 10.00 NA NA 1 10.00 14,479.00

70. 31.00 NA NA 1 31.00 14,510.00

71. 7.00 NA NA 1 7.00 14,517.00

72. 35.00 NA NA 1 35.00 14,552.00

73. 66.00 NA NA 1 66.00 14,618.00

74. 259.00 NA NA 1 259.00 14,877.00

75. -6.00 NA NA 1 -6.00 14,871.00

76. 628.00 NA NA 1 628.00 15,499.00

77. -1.00 NA NA 1 -1.00 15,498.00

78. -29.00 NA NA 1 -29.00 15,469.00

79. 26.00 NA NA 1 26.00 15,495.00

80. 145.00 NA NA 1 145.00 15,640.00

81. -70.00 NA NA 1 -70.00 15,570.00

82. 6.00 NA NA 1 6.00 15,576.00

83. 134.00 NA NA 1 134.00 15,710.00

84. -10.00 NA NA 1 -10.00 15,700.00

85. -17.00 NA NA 1 -17.00 15,683.00

86. 494.00 NA NA 1 494.00 16,177.00

87. 9.00 NA NA 1 9.00 16,186.00

88. 368.00 NA NA 1 368.00 16,554.00

89. 250.00 NA NA 1 250.00 16,804.00

babarmughal:
Hi mikejody,

what kind of indicator is this...???

thanks
57

Watch a 1 min. chart for a while - it repaints up to 2 bars back!