"Pin Bar" Alerts

This is a discussion on "Pin Bar" Alerts within the Trading Software forums, part of the Commercial category; The purpose of this thread is to discuss the implementation of a software package (or plugin to an existing trading ...

Reply
 
LinkBack Thread Tools Search this Thread
Old Nov 21, 2007, 8:23pm   #1
 
lurkerlurker's Avatar
Joined Jan 2007
Lightbulb "Pin Bar" Alerts

The purpose of this thread is to discuss the implementation of a software package (or plugin to an existing trading platform) to scan a predefined instrument list at regular intervals looking for "pin" bars.

Over on TD's "Making Money Trading", great use is made of hourly pin bars on FX, indices, and commodities. We would like some software which will scan 30 or so FX and futures markets for hourly pin bars at the close of each hour. The software should then output the names of the instruments showing a pin bar to either a local file, email, or website.

TD and others using this system work full time, and while they may have the time to enter orders if they see a pin they would like to take based on confluence with other price action factors, it is not feasible for them to manually check 30 or so charts on the hour every hour.

So, if any programmers would like to weigh in here with ideas, we would appreciate it. Currently the preference is for developing a plugin/extension/script for MT4 as we have free real time feeds for FX and futures with this platform. The software shall:
  • Be able to flag a pin bar when it occurs
  • Scan multiple instruments
  • Provide automated output when it finds a pin

Additionally, the software should:
  • Accept user defined instruments and timeframes to search
  • Have used defined timeframes and testing intervals
  • Show the names of the instruments showing a pin bar in an accessible data format which can then be used as the basis for an email alert or web page

Assistance with this project would be greatly appreciated. Please refer to the thread "Making Money Trading" (link in signature) for more information on this trading method. TD has done a great job teaching new traders how to execute high probability low risk entries using this price action pattern on both daily and hourly charts. It would be useful to all of us to be able to check if a valid signal may have occurred on the many instruments we would like to monitor each hour.

Thanks in advance.
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 8:43pm   #2
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread Within MT4, you can send email alerts. From some brief reading, it appears that you can use the SendMail command to give an alert using email settings defined in the software.

We already have a MT4 script which detects pin bars (which I am awaiting permission to publish. We could insert something like

SendMail(Symbol()+" Pin bar found");

into the function which detects pin bars to have it send an email when it finds one.
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 8:56pm   #3
Global Moderators are volunteer members with senior administrative powers to moderate all forums.
 
counter_violent's Avatar
Joined Aug 2004
Hi lurker,

MT4 experts indicators and advisors are all over the web....there will be i'm sure something out there in the public domain...weather or not these are any use is the question...a lot of this stuff is very badly written for starters so this is why its best to send anything thats posted for evaluation....makes sense...i for one would'nt want some half baked useless indicator advising newbies to do this do that etc...without first finding out How it works ...and What its telling us.....and I think the real point in all this is...they may only be used as comfort indicators anyway...the top and bottom of it is.....no indicators are a substitute for " doing the work "
__________________
Spreading the madness across this suite of forums.

Those are my principles and if you don't like them, well..... I have others.
counter_violent is offline   Reply With Quote
Thanks! The following members like this post: ian
Old Nov 21, 2007, 9:25pm   #4
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread
Quote:
Originally Posted by counter_violent View Post
Hi lurker,

MT4 experts indicators and advisors are all over the web....there will be i'm sure something out there in the public domain...weather or not these are any use is the question...a lot of this stuff is very badly written for starters so this is why its best to send anything thats posted for evaluation....makes sense...i for one would'nt want some half baked useless indicator advising newbies to do this do that etc...without first finding out How it works ...and What its telling us.....and I think the real point in all this is...they may only be used as comfort indicators anyway...the top and bottom of it is.....no indicators are a substitute for " doing the work "
To be clear, there is only one purpose for doing this:

To let TD and I know at a glance whether we need to look at a chart every hour.

That is to say that the software should provide an alert for anything which resembles a pin bar, and give us the instrument name. We can then look at the chart for ourselves. However, this means we will know at a glance how many of the 30 odd charts we would need to pull up - obviously TD can't be expected to spend 30 minute on one of 30 instruments on the hour every hour - that is a quarter of the working day!

We want something which tells us where to look when there is a signal. Obviously we'd then take a look at the pin on a chart to see if it was worth taking, but we are both sick of missing signals because we only have time to check 5 or so instruments every hour.

So far, I'm hacking at the MT4 file I've been given. It detects pins, and I've written code into it to send an email when it sees one. This works. Unfortunately, it works too well and sends a few hundred emails per instrument (all the pins previously on the chart).

I've dropped down to a 1 minute so I can see if it triggers an email in real time. What I then intend to do is pull up 50 or so instruments on the 15M, tell it to look for pin bars, disable the email, add the indicator, enable the email, and leave it running overnight.

If it gives the proper signals during the night, I'll then switch it to hourly monitoring only, and write a perl script which goes into the .Maildir of the user I've set up for this, extracts the subject from the emails, and outputs it to foo.html on my webserver, so that we can access http://myserver/foo.html which should have output such as

"22092007 21:01 BEARISH Pin formed on EURUSD"
"22092007 21:01 BEARISH Pin formed on EURGBP"
"22092007 22:01 BULLISH Pin formed on GBPJPY"


etc.
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 9:27pm   #5
 
trendie's Avatar
Joined Jan 2004
Quote:
Originally Posted by lurkerlurker View Post
Within MT4, you can send email alerts. From some brief reading, it appears that you can use the SendMail command to give an alert using email settings defined in the software.

We already have a MT4 script which detects pin bars (which I am awaiting permission to publish. We could insert something like

SendMail(Symbol()+" Pin bar found");

into the function which detects pin bars to have it send an email when it finds one.
[my emphasis added]

good for you. coincidentally, just this morning, I was asking about sending signals to SMS. Could you show an example where the SendMail command works?
not asking you to reveal any programming secrets, just any example would be useful.

hope you didnt have to write your code from scratch, as
http://codebase.mql4.com/indicators
seems to be a good base to work from.
__________________
# If the only tool you have is a hammer, you tend to see every problem as a nail - Abraham Maslow
# There are 10 kinds of people in the world; those that understand binary, and those that dont. -Anon
# Ed Seykotas Whipsaw Song http://www.youtube.com/watch?v=LiE1V...Wlxk8&index=10
# Defeat is temporary. Giving up makes it permanent. Anon
trendie is offline   Reply With Quote
Old Nov 21, 2007, 9:27pm   #6
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread Okay, that is all well and good. The email works. It works so well that it sends an email every second for every pin bar on that instrument. A few thousand emails later...... Thankfully I'm running this on my own servers.
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 9:29pm   #7
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread
Quote:
Originally Posted by trendie View Post
[my emphasis added]

good for you. coincidentally, just this morning, I was asking about sending signals to SMS. Could you show an example where the SendMail command works?
not asking you to reveal any programming secrets, just any example would be useful.

hope you didnt have to write your code from scratch, as
http://codebase.mql4.com/indicators
seems to be a good base to work from.
Hi trendie

Not a problem - no secrets here. The issue is that somebody gave me the MT4 script which I have now modified to send email. I used the website you refer to for documentation for the sendmail script. I don't know how to use SMS just yet - I'm working on email.

I don't mind posting the script, but I need permission from the author first. Stay tuned.

On a semi-related point - do you know how to stop MT4 sending emails EVERY SECOND?
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 9:31pm   #8
 
trendie's Avatar
Joined Jan 2004
Quote:
Originally Posted by lurkerlurker View Post
.....
On a semi-related point - do you know how to stop MT4 sending emails EVERY SECOND?
no. but I dont have a problem having a look at it tomorrow mid-morning onwards.
__________________
# If the only tool you have is a hammer, you tend to see every problem as a nail - Abraham Maslow
# There are 10 kinds of people in the world; those that understand binary, and those that dont. -Anon
# Ed Seykotas Whipsaw Song http://www.youtube.com/watch?v=LiE1V...Wlxk8&index=10
# Defeat is temporary. Giving up makes it permanent. Anon
trendie is offline   Reply With Quote
Old Nov 21, 2007, 9:37pm   #9
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread
Quote:
Originally Posted by trendie View Post
no. but I dont have a problem having a look at it tomorrow mid-morning onwards.
Cheers. It appears that a variable value in my code will change every tick, causing notification of the pin bars already displayed on the chart to be sent every few seconds. Obviously this is not in order, but I don't know how to fix it yet.

I've spent 90 minutes on this already tonight, and have got quite far, but I have other things to do.

Summary:
Pin bar code imported into MT4
Code edited to send mail when it sees a pin bar
New user setup on my mail server to deal with pins
MT4 set up with SMTP details
Web IMAP interface set up

To-do:
Stop MT4 sending repeat alerts
Test with multiple concurrent pairs
Write perl script to output the pertinent parts of the maildir to a webpage

Optional:
Prettify the output
lurkerlurker is offline   Reply With Quote
Old Nov 21, 2007, 9:51pm   #10
 
lurkerlurker's Avatar
Joined Jan 2007
lurkerlurker started this thread Okay, I've got the pin bar alerts provisionally setup.

I've loaded hourly charts of 15 instruments, 13 of them FX. It initially sent over 1k emails, but I don't suppose this can be helped. They are now deleted, and as far as I am aware it should send out an email the next time a pin bar closes.

I've noticed that the script has some false positives, which is okay, but also that it overlooks bars we would consider pins (which is not). Perhaps the parameters need a little more tweaking in favour of more sensitivity.

Bars close in 10 minutes, so I will see if I get a flood of updates again. If not, we are pretty close to getting it working.

I'll make a website available to you guys when I get this working. Said website will name any instrument on our watchlist which has just closed a pin bar on the H1 charts.
lurkerlurker is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
WANTED: "Trading the Easy Way" course & "Knowledge To Action" DVD Bluewave For Sale & Wanted 7 May 3, 2009 12:45pm
"Studies in Tape Reading" & "The Day Trader's Bible" Scorpian Technical Analysis 1 Jun 30, 2008 3:30am
Anybody got experience of "Bright Trading" or "The Marlin Letter"? elsaQ Educational Resources 7 Feb 22, 2008 2:31am
Retail brokers - "hedging" & "trading against the client" JTrader Brokerages 20 Nov 26, 2004 7:57pm

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)