Hi fellows, especially fellow programmers.... I was wondering the ways of how the bot can identify a doji price bar, where the open and close price of a bar close relatively the same. I'm not programming this myself but I'd like inputs on how to do it MQL4's language wise.. I mean its easy and basic to code if (Open==Close) that would also be a doji bar, unfortunately it doesn't always close at the same exact price, so I need help of other ways to make this more complex, say the close closes 2 pips away from the open, that's still a valid doji.... Any help appreciated thanks.
try this if(double MathAbs(open-close) <=2*Point).........doji = true.
You could also use a percentage of say close as in 0.01*close; instead of the fixed value of 2 pips, that would give you a sliding value for all time frames.
likely need to determine value of percentage to use empirically.
Many thanks Keith!