Pinbar Detector

speedytina

Active Trader
Sep 29, 2015
13
4
39
72
Mississauga, Canada
Visit site
Hello Enivid;
I am trying move the "happy face" signals farther away from candles. I assume that something needs to be changed within following code. I have tried every which way to change the code but the "happy face" signal wont budge.
What am I doing wrong?

MQL4:
//---- indicator buffers mapping
   SetIndexBuffer(0, Down);
   SetIndexBuffer(1, Up);
//---- drawing settings
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 74);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 74);
//----
   SetIndexEmptyValue(0, EMPTY_VALUE);
   SetIndexEmptyValue(1, EMPTY_VALUE);
//---- indicator labels
   SetIndexLabel(0, "Bearish Pinbar");
   SetIndexLabel(1, "Bullish Pinbar");
 
Last edited by a moderator:
Jan 9, 2018
1
0
6
55
Visit site
How do you change the values of the input variables on the Pinbar Detector? Thought email notification would be helpful so as not to have to stare at the charts continuously and for tweaking purposes.
 

Tiengrt

Trader
Aug 25, 2018
2
0
6
29
Visit site
May you help me code the CútomMinimumnosebodysize— minimum allowed body/length ratio for the Nose and Minimum bodysize?
I wanna body size longer than 1 pip
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,624
733
144
Odessa
www.earnforex.com
If you just want to be able to set the minimum body size in pips (like 1 pip, for example), you do not need to code something like CustomMinNoseBodySize with body/length ratio calculation. You could just add an extra condition like this:
MQL4:
if (MathAbs(Open[i] - Close[i]) < Point) continue;
 

PaulVic

Master Trader
May 26, 2016
36
3
49
Midlands, UK
Visit site
Hi Enivid, nice indicator. Sorry to be a pain..
Any chance of adding tick volume to the equation.
A pin bar on high volume has more chance of being a reversal, if it does not reverse on high volume it becomes a sign of weakness (assuming it was looking like a bullish pin bar), so either way a signal is given. High volume pin bars can be a sign of market makers laying down a support/resistance zone to initiate a trading range.
I would suggest something along the lines of "where volume is greater than X times the average of the last Y number of bars.
Help as always appreciated, thanks Paul
 

Nguyen Dan

Newbie
Dec 17, 2018
1
0
1
35
Visit site
If you just want to be able to set the minimum body size in pips (like 1 pip, for example), you do not need to code something like CustomMinNoseBodySize with body/length ratio calculation. You could just add an extra condition like this:
MQL4:
if (MathAbs(Open[i] - Close[i]) < Point) continue;

hi. i'm studing to code with MT4. can you explain for me that what is the "POINT" in this post.
 

Enivid

Administrator
Staff member
Nov 30, 2008
15,624
733
144
Odessa
www.earnforex.com
hi. i'm studing to code with MT4. can you explain for me that what is the "POINT" in this post.

Point
is a predefined variable in MT4, which stores the current symbol's pip size. For example, if the code is executed on a EUR/USD chart the Point's value will be "0.0001" (or 0.00001 if on a 5-digit broker). You can read more about the variable here:
https://docs.mql4.com/predefined/pointvar

Also, in MetaEditor, it is possible to move the pointer to any predefined variable/function or keyword and press F1 to open a built-in help on the subject.
 

andrexavier

Trader
Feb 8, 2018
1
0
17
45
Visit site
I would like to ask Enivid. In your experience, what is the best setting to use to capture trend reversal? Should we keep the USE CUSTOM SETTINGS parameter as FALSE? And if it's like TRUE, what is the best setting for each parameter of the following lines?