| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Establishing a dynamic buffer around the MACD zero line ? https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=2563 |
Page 1 of 1 |
| Author: | RxCape [ Wed Jun 19, 2013 5:36 pm ] |
| Post subject: | Establishing a dynamic buffer around the MACD zero line ? |
Coders: I am testing TallCoolOne's D1 Trend / 1H entry EA on shorter timeframes. I am posting this question here so I do not pollute his thread with questions on shorter timeframes. On the shorter timeframes, I am finding that conditions still exist for the EA to take a trade, even though the MACD histogram is quickly approaching the zero line, indicating a weakening trend. Typically, this situation results in a stop loss of the trade. I have been noodling with the idea of establishing a buffer zone around the zero line so that if the MACD histo is within this buffer zone, the EA considers price action to be ranging and does not trade. I am able to edit the code to establish a fixed buffer zone rather than just above / below zero. For example, if MACD > 0.0004 or MACD< -0.0004 to establish a ranging trend. However, this fixed number may not be appropriate at all times and it certainly seems to be different for each pair. Attached is screenshot with a crude attempt at illustrating the zone. I was wondering if there is a way to establish a dynamic buffer zone based upon the range of the histogram over the last XXX bars. My simple mind was considering some % of the recent range as the buffer zone. Does this make sense? is it possible to interrogate the MACD indicator for the range of the histogram over some period of time? Alternately, I have considered replacing the MACD with the Schaff Trend Cycle indicator because it essentially a MACD that indicates trend changes much sooner than MACD. However, that would be changing the strategy / method a bit too much. Thanks for any help you can provide. |
|
| Author: | phil_trade [ Fri Jun 21, 2013 4:05 pm ] |
| Post subject: | Re: Establishing a dynamic buffer around the MACD zero line |
of course, with the Shift parameter of iMACD() you can loop back x bars and do some calculation. Philippe |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|