omissamf: I would say that the length of the shadow must be> = 3 times the length of the Candlestick Body.
if(MathAbs(Open[i] - Close[i]) <= 0.3 * myPoint |1.23450 - 1.23490 | <= 0.3 * 0.0001 0.00040 <= 0.00003
o-c <= 3 points? That's not your definition.&& Open[i] < Close[i]
What does the color of the candle have to do with it? That's not your definition.- Code it exactly what you said:
double upperBody = MathMax(Open[i], Close[i]); double bodySize = MathAbs(Open[i] -Close[i]); double upperShadow = High[i] - upperBody; if(upperShadow >= 3 * bodySize)
Write self-documenting code. The == operand. - MQL4 forum
Hello WHRoeder, I tried your code and it works well. But I would also define the length of the lower shadow. I thought to use your modified code, but do not understand where I'm wrong.
double upperBody = MathMax(Open[i], Close[i]); double downBody = MathMin(Open[i], Close[i]); double bodySize = MathAbs(Open[i] -Close[i]); double upperShadow = High[i] - upperBody; double downShadow = Low[i] - downBody; if(upperShadow >= 3 * bodySize && downShadow <= 1 * bodySize && bodySize > 0 )
Thanks for everything, Massimo.
omissamf:
Hello WHRoeder, I tried your code and it works well. But I would also define the length of the lower shadow. I thought to use your modified code, but do not understand where I'm wrong.
Thanks for everything, Massimo.just put downBody before Low[i]
double downShadow = downBody -Low[i];
awran5:
Hello awran5, I'm a wimp !!!!just put downBody before
I tried to do as you suggested and it works well.
Thanks for everything, Massimo.
Thanx a lot for YOUR topic and answers!
Very help me in my task!
Very help me in my task!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys, I have a problem with the code.
I want to find the Pinbar (1) as in the picture excluding the Pinbar (2).
I would say that the length of the shadow must be> = 3 times the length of the Candlestick Body.
I wrote this code but it does not work.
I need your help, thank you all, Massimo.