Last active
January 23, 2016 20:53
-
-
Save matthewkastor/6f7b7beb4416a1f1e29c to your computer and use it in GitHub Desktop.
function for getting the candle direction 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
//int candleDirection = CandleDirection(1); | |
int CandleDirection(int index){ | |
int output = 0; | |
if(Open[index] < Close[index]) { | |
output = 1; | |
} | |
if(Open[index] > Close[index]) { | |
output = -1; | |
} | |
return output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment