Last active
August 29, 2015 14:08
-
-
Save chew-z/2632a5fac75086aed9f5 to your computer and use it in GitHub Desktop.
my version of PinBar function
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
double PinBar2(int minimumBar) { | |
double o=Open[1], c=Close[1]; | |
double h=High[1], l=Low[1]; | |
double b = MathAbs( o - c ); | |
if ((h-l) < minimumBar*pips2dbl) //ignoruj śmieci | |
return(0.0); | |
double wup = h - MathMax(o, c), wdn = MathMin(o, c) - l; | |
if (wup >= 2.0*b && wdn <= b) //długi górny wąs - sygnał na krótką | |
return (-wup/b); | |
if (wdn >= 2.0*b && wup <= b) //długi dolny wąs - sygnał na długą | |
return (wdn/b); | |
return (0.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment