Pinbar Detector

Discussion in 'MetaTrader Indicators' started by Enivid, Nov 7, 2011.

  1. DerekC

    DerekC Trader

    15
    1
    13
    Enivid, nice work again. Any chance you would have a diagram/picture which would explain the criteria that are customize-able as parameters on the Pinbar. The words in the explanation aren't enough for my visual mind...
     
  2. DerekC

    DerekC Trader

    15
    1
    13
    Has anyone on the forum done work with Profiles? I'm wondering how I can put the PinBar Indicator on 20 charts and have it give me an alert when one comes up? I think they have to be active, and I'm wondering if I can make them active, and yet minimized on a separate screen from the one that I may be working on currently.

    Thank you,
     
  3. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    I will see what I can do. Thanks for suggestion!

    Yes, you can create a chart template with Pinbar attached and with alerts settings you need. You would then just apply the template to as many charts as you want. The alerts will work even if the charts are minimized. However, the platform needs to be running to generate alerts. If you need help with templates, here is a short tutorial: https://www.earnforex.com/blog/meta...opying-settings-between-charts-and-platforms/
     
  4. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    I have added some images to the input parameter descriptions. I hope they help!
     
  5. DerekC

    DerekC Trader

    15
    1
    13
    They are perfect. So helpful. Thank you.
     
  6. yousername

    yousername Newbie

    2
    0
    1
    This is an awesome indi.
    I combined this with CCI and stochastic divergence becomes a killer combo!
     
  7. Freddie

    Freddie Trader

    2
    0
    6
    Hi,

    I have downloaded this for MT5:
    https://www.earnforex.com/metatrader-indicators/Pinbar-Detector/

    And have been playing around with the settings, however it still shows the same signals, should I reboot MT5?

    I am looking for very obvious pin bars, where the tail is very much well below the previous candle, and it just stands out.

    Also how can I adjust it, so that it will only show a pin bar that has closed outside of a bollinger band, hence giving a strong reversal to the mean signal.

    Thanks
     
  8. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    No, rebooting the MT5 is not required. When you change some input parameters and close the inputs window, the indicator should refresh the display. Please let me know which settings are causing the trouble? What values do you set, what do you change them to, and what currency pair and timeframe you are looking at?
     
  9. Jon02

    Jon02 Trader

    3
    0
    6
    I really like your indicator Enivid, THANK YOU for your hard work.

    1 question, I am new to coding, what would the code be to add push notification instead of email notification.
     
  10. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    The simple way would to change the line #222 from:
    Code (MQL4):
    SendMail(Symbol() + " @ " + per + " - " + dir + " Pinbar", dir + " Pinbar on " + Symbol() + " @ " + per + " as of " + TimeToStr(TimeCurrent()));
    to:
    Code (MQL4):
    SendNotification(Symbol() + " @ " + per + " - " + dir + " Pinbar");
    Of course, you may wish to add a separate input parameter for push alerts and add a separate alert check to preserve both types of alerts instead of replacing the email one with the push one.
     
  11. Jon02

    Jon02 Trader

    3
    0
    6
    Do I keep line 221 as
    Code (MQL4):
    if (UseEmailAlerts)
    or
    Code (MQL4):
    . The latter one brings an error
     
    Last edited: May 16, 2017
  12. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    I see no difference between the two lines.
     
  13. Jon02

    Jon02 Trader

    3
    0
    6
    Sorry I just updated it.
     
  14. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    You keep the line 221 as it is if you just want to replace the email alerts with the push ones.
     
  15. Murthy

    Murthy Trader

    3
    0
    6
    Hello Enivid.
    Appreciate your hard work.
    Could you please let me know how to call this indicator from EA?
    What the value will return to EA in case of Bearish / Bullish?
     
  16. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    There are two buffers in the indicator. In case of a bearish pinbar, the buffer #0 returns some non-EMPTY_VALUE (the price level where the smile face is drawn). In case of a bullish pinbar, the buffer #1 returns some non-EMPTY_VALUE (the price level where the smile face is drawn).
     
  17. Murthy

    Murthy Trader

    3
    0
    6
    Thank you Enivid for the prompt reply.
    In case of Bullish, buffer #1 returning value other than 2147483647.0.
    In case of Bearish, buffer #0 returning value other than 2147483647.0.

    based on above values i designed my EA and it works to capture Bullish / Bearish.
     
  18. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    It is better to check the output against the language constant EMPTY_VALUE rather than against the "raw" number 2147483647.0.
     
  19. Murthy

    Murthy Trader

    3
    0
    6
    Hello Enivid,

    Below is the EA code used by me to call the
    Indicator

    Code (MQL4):
    Mode_Bearish = iCustom(Symbol(),0, "PinbarDetector", 0,true,false,false,0.33,0.4,true,false,false,0.1,0.5,1,0,0.1, 0,1);
    Mode_Bullish =  iCustom(Symbol(),0, "PinbarDetector", 0,true,false,false,0.33,0.4,true,false,false,0.1,0.5,1,0,0.1, 1,1);
    if(Mode_Bearish != 2147483647.0 || Mode_Bullish != 2147483647.0)
    Print("Mode_Bearish",Mode_Bearish, " Mode_Bullish ", Mode_Bullish);
    Below is printed in Journal
    2016.09.15 00:00:00 PinbarDetector USDJPY,Daily: Alert: Bearish Pinbar on USDJPY @ D1
    2016.09.15 00:00:00 PinBarEA USDJPY,Daily: Mode_Baerish 103.5758 Mode_1 2147483647.0

    Could you please let me know whether I need to change the way I call the custom indicator and to enable it to capture empty_value.
     
    Last edited by a moderator: May 31, 2017
  20. Enivid

    Enivid Administrator Staff Member

    9,299
    327
    114
    You need to replace 2147483647.0 with EMPTY_VALUE.
     

Share This Page