Pin Bar System

Should Pocrel trade the "pin bar system" live again


  • Total voters
    24
  • Poll closed .
Trade alert: long order pending gold

chart
gold.gif
 
Provided entries/exits are 100% mechanical i would agree automated trading as an alternative is a no brainer. In this case though we are nowhere near being 100% mechanical. The crux is the pin. The indicator with the EA missed both the WTI and BRENT trades on Friday which were 'classic' pins. Pocreal took a trade either last week or week before (its in the thread) which was nothing like a pin (cant remember how that worked out for him).
To make this mechanical we would need to:
1. decide on the perfect 'pin bar' shape.
2. give that perfect pin a numeric value.
3. decide on a set of criteria we could use to compare any candidate pin to our pefect pin, giving weighted values to each of those criteria so we could give a numerical value to 'how good' our candidate pin is.
4. Do similar to the preceeding bars so we can judge how bullish or bearish sentiment is at the time.

I doubt we would ever get past part even deciding the criteria for part 3 let alone the weightings.

We can improve the EA though. I think we need to look at its pin bar detection to start with. Then its adding some basic trade management like proper targets, being able to move the stop, being able to part close etc. If we do this we should be able to make it profitable but i dont think we will get near the profitability of being able to use discretion.

Sorry, i am a programmer by trade so i tend to over analyse stuff like this,
good post. I am just learning how to use tradestations easy language (my first go at programming) and I must say am enjoying it thoroughly. (so much that I spent all weekend on it!!)

The way I defined a bullish pin would be for both open and close to be > low + 0.6 * (High - low). Of course we can add other conditions such as Close > open and close = high which would make it a perfect "hammer".

I dont see a problem having similar conditions for last 2 bars either. On that I would describe bars that I would want to avoid - such a a big down bar where open is close to high and close = low.

Can add other conditions such as stoch or MACD confirming the trade etc...

The only problem I have would be with exits, which I cant describe as fully mechanical.

I have also hit a couple of snags trying to code the system:

1) dont have a clue how to tell it cancel order if high of pin not broken in next 2 bars or if the low is broken first.

2) Setting a stoploss. I put (EntryPrice-low) but it trails it and moves with each bar as opposed to staying fixed at EntryPrice - LowOf pin). And if I put EntryPrice - LowofPin, I get a syntax error.

Have e-mailed their helpdesk. Hoping to get a response today.
 
Ignore me pocrel, just seen your chart, my pivot points are skew wiff to say the least........
 
trade alert, i fancy shorting this bar on the euro, if i do i will close the eurgbp trade
 
stopped out of gold

-32 full points

I didnt like that pin. I almost made a comment on it because on my charts the body was very much in the middle of the pin. It looked a lot better on your chart though which is why i didnt say anything.

I am trialling an indicator i am working on which didnt like the pin either. It marked it as a pin but with an 'N' meaning the direction could not be determined with any confidence. When i am happy with the coding of it i will integrate it into the EA. At the moment its very much a hack and slash.
 
OK, Just going to post a quick pic of my PB indicator work in progress so you can have a look at the sort of pins its showing. It just identifies pins and possible trade direction at the moment. It doesnt care where they are.
 

Attachments

  • pbExample.png
    pbExample.png
    19.7 KB · Views: 159

euro breaking up so that bar is cancelled now, eurgbp looking terrible too, not a great day for me not in tune with the market

thanks to Mata Nui for the work also on the pin looks interesting would have kept me out f that gold trade (y)
 
I didnt like that pin. I almost made a comment on it because on my charts the body was very much in the middle of the pin. It looked a lot better on your chart though which is why i didnt say anything.

I am trialling an indicator i am working on which didnt like the pin either. It marked it as a pin but with an 'N' meaning the direction could not be determined with any confidence. When i am happy with the coding of it i will integrate it into the EA. At the moment its very much a hack and slash.

Hi, Your pin bar indicator looks much better and this is definitely worth putting the effort in to identifying the right sort of pins.

You mention that you plan to incorporate the revised pin indicator back into the EA.

Are you going to continue with the same EA as 'donated' by megamuel ?

While this EA serves as a reasonable starting point, the performance issue makes it very difficult to work with.

I've tried running this EA on a 64 bit Win 7 Dual Core PC with 8Gb of memory and it still takes hours to backtest just a few months.
 
Just back. got stopped out of the eurjpy for 24 points. Unlucky patrick.

Although its easy to say afterwards, the gold R1 was a bit iffy. its not the same as Livecharts or OilnGold. However on my autopivots R1 is the same as yours.
 
OK. This is the pin bar indicator i have created this morning. Although i am a professional software developer i have not been using mql for that long so i make no guarantees or warranties relating to this.
It has a couple of parameters you can alter to your preference and has an optional sound alert.

MinPercentRange – The indicator takes the average range of the last 6 bars so we don’t get stupidly small pins etc. This is the minimum range our candidate must be in relation to this average.
BodyToRangeRatio – The size of the body as a percentage of the total range expressed as a ratio. (3.3 is 33%) just divide your percent by 10.
Body DirectionalPercent – The body must be enclosed in the top or bottom x percent of the bar. In this case 45. So for a long trade the body needs to be enclosed in the top 45% of the bar.

By changing these settings you should be able to make it more or less sensitive to the perfect pin shape.

This indicator is free for you to use or modify as you want. All i would say is can you please post any changes, settings or anything you include it in here so we can all benefit.
 

Attachments

  • HSPinBar.mq4
    5 KB · Views: 215
OK. This is the pin bar indicator i have created this morning. Although i am a professional software developer i have not been using mql for that long so i make no guarantees or warranties relating to this.
It has a couple of parameters you can alter to your preference and has an optional sound alert.

MinPercentRange – The indicator takes the average range of the last 6 bars so we don’t get stupidly small pins etc. This is the minimum range our candidate must be in relation to this average.
BodyToRangeRatio – The size of the body as a percentage of the total range expressed as a ratio. (3.3 is 33%) just divide your percent by 10.
Body DirectionalPercent – The body must be enclosed in the top or bottom x percent of the bar. In this case 45. So for a long trade the body needs to be enclosed in the top 45% of the bar.

By changing these settings you should be able to make it more or less sensitive to the perfect pin shape.

This indicator is free for you to use or modify as you want. All i would say is can you please post any changes, settings or anything you include it in here so we can all benefit.

Replying to my own post:whistling
I just wanted to add the logic is the same as the screenshot i posted earlier. I have just replaced the labels (S,L,N) with the more standard arrows (in indicator buffers so you should be able to integrate it like any other indicator) and added an optional sound alert. The pins that were marked by an 'N' label (unable to accurately determine direction) are now simply not marked.
 
Top