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!!)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,
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
chart
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. 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.