MACD onBar / HasCrossed issue
MACD onBar / HasCrossed issue
11 Dec 2012, 19:42
Hi All,
I'm runnig a robot that uses the HasCrossedAbove/ Below function to check whether Main series of the MACD Histogram has crossed the Signal series (periods = 4). It's set to run on EURUSD 1H onBar.
The problem I have is that it tends to take into account the bar that has just opened. This is an issue as on occasion the first tick of a new bar (i.e. onBar) takes the MACD Main above or below the Signal, thus causing the robot to open a position. Eventually the bar closes in such a way that the two series end up 'uncrossed'.
Example: The attached pic @ 10:00 today when my robo opened a sell order - Main = 0.000531; Signal = 0.000539. On close of this bar the values were 0.00056 and 0.00055
So my q is: is there a way to have the same functionality as the HasCrossedAbove/ Below function but have it ignore the bar that has just opened so that false signals are filtered out?
Cheers
Replies
ErykSosenka
12 Dec 2012, 18:09
Thanks for the tip...
Any suggestions with regards to the actual problem?
Cheers
@ErykSosenka
ErykSosenka
11 Dec 2012, 19:45
sorry don't seem to be able to attach it to the post...
-----> http://fxpro.ctrader.com/c/DfP5n
@ErykSosenka