Last active
January 23, 2016 20:54
-
-
Save matthewkastor/d58e6be6190c37a93307 to your computer and use it in GitHub Desktop.
function for analyzing whether the candle body is at least 30 percent of its height in metatrader 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bool candleIsStrong = CandleIsStrong(1); | |
bool CandleIsStrong(int index) { | |
bool output = false; | |
double totalHeight = High[index] - Low[index]; | |
double bodyHeight = MathAbs(Open[index] - Close[index]); | |
if(totalHeight != 0 && bodyHeight != 0) { | |
output = ((totalHeight / bodyHeight) > 1.3); | |
} | |
return output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment