Skip to content

Instantly share code, notes, and snippets.

@currencysecrets
Last active December 20, 2015 14:09
Show Gist options
  • Save currencysecrets/6144620 to your computer and use it in GitHub Desktop.
Save currencysecrets/6144620 to your computer and use it in GitHub Desktop.
/**
v2.0
This function checks to determine that a breakout candle has occurred.
A breakout candle contains the majority of it's body in the candle (no long tails).
*/
bool isBO( double o, double h, double l, double c, double volt, bool isLong ) {
if ( MathAbs( o - c ) > volt ) {
if ( MathAbs( o - c ) / ( h - l ) > 0.8 ) {
if ( c > o && isLong ) {
return( true );
}
if ( o > c && !isLong ) {
return( true );
}
}
}
return ( false );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment