Skip to content

Instantly share code, notes, and snippets.

@matthewkastor
Last active January 23, 2016 20:53
Show Gist options
  • Save matthewkastor/6f7b7beb4416a1f1e29c to your computer and use it in GitHub Desktop.
Save matthewkastor/6f7b7beb4416a1f1e29c to your computer and use it in GitHub Desktop.
function for getting the candle direction in metatrader 4
//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