Tuesday, December 27, 2011

Tipster Trendlines for MT4 – NEW

If your looking for an EA to help you place your manual entries, exits, targets and so forth, here is one that I just posted.  All you have to do is load the EA and it draws lines for you, just move them around and start the EA.  Here’s an excerpt from the manual that is posted with the EA file.
I wrote this EA to be able to place my manual trades easily, avoid errors, and let the computer do the repetitive tasks. If you enter trades manually this EA should help you.
I use EA robots as well as enter manual trades based on price action. This EA can be used on the same platform as other robots, just make sure the Magic Numbers (MN) are different. This EA also used Magic Number to track, so ensure your broker let’s you use MN’s. Order comments are used but not required. Brokers such as Oanda do not let you use MN’s, and the comment field is filled out by them so be careful, run this on a demo account first to ensure it works as expected.
This document will only discuss the 2P version, the 1P is very similar.
To setup an order, you need to place the 5 lines on the chart to a valid location (Entry, Stop, Target 1, Target 2, BreakEven), then go to Expert Advisors Properties and set LimitOrder to true or false. The EA will display the order type on the lower left of the chart, check it before you set “Live” to ‘true’ in EA Properties. Lines can be horizontal or sloped.
The EA determines the type of order based on the location of the lines relative to each other and current price. Note: If the ticket numbers (generate by MT4) are not sequential a pop up box will appear, you can select to delete the orders. If the order ticket numbers are not sequential, the EA cannot manage the trade properly.
Placing a Trade
Here’s a quick run through of how a typical trade set-up is accomplished once the EA is on the chart and MT4 is set up as described above.
1. Set up the lines.
2. Turn on the EA, EA properties à Live = “true”, LimitOrder = “true of false”
3. Price is not between the dashed blue buffer line and the blue entry line, the bottom left on the screen says “+LIVE+ …waiting. Sell Stop order set”.
4. Price is now between the two lines described above, two orders are sent to the broker (pending limit orders), and the only difference is the targets. The bottom left of the screen says “+LIVE+ <<PENDING ORDER>> Sell Stop order for 0.10 lots
5. The target for the second order is always closest to the entry, the EA takes care of this, even when you move the lines around when the trade is open. This is done so it can track the single remaining order once the first target is hit. When you have a pending order (not filled) you can drag the lines around. Note that the lines cannot be on top of each other, the EA keeps them slightly apart so you can grab them.
6. When price hits the entry line you are now in a position, you can drag the lines around. Be careful not to drag the targets or stops to close to current price or your position could be closed unexpectedly. Sometimes it’s a good idea to make Live = false and adjust the lines up, then turn it back on. You can also use the “Expert Advisor” button on the MT4 menu area.
7. A screen capture image is stored in /experts/files/ with the filename that shows the symbol, ticket number, etc so you can figure out what the trade setup was when you look at the picture in the future. Images are captured so you can review your trades later to see what you can improve upon.
8. After price hits a target one order is closed and the other is tracked by the EA as long as it is on and running. If you used horizontal lined you can turn the EA off. If you used sloping lines you need to leave it on so it will update the new order details as new bars open.
9. Once both positions are closed an image capture is stored in /experts/files/
10. To reset the EA you can just delete one of the lines, the line will be re-drawn and the EA will be ready to go again. The best method however, is to got o EA properties, “Reset”, then right click on the chart to “Objects”, CNTL A to select all, then “Delete”. Another way is to use the TipsterDelete script that will clear the screen.
11. Press Q and P at the same time to move the stop back to the red stop line. The EA will only move the stop towards profit and won’t let you move it away unless you press Q and P, then a pop up message appears. For this functionality to work, you must enable dll’s, and live trading.

The link is at the top of the blog.  Or you can search on MQL5.com.

Saturday, December 24, 2011

Prettify / Beautify / format your MQ4 code in 30 seconds (or any code)

Here’s a really easy way to format your code. Formatting code makes it easier to read the logic flow, this little program automatically indents, fixed spaces and tabs. After my EA's get to big and add the debugging to the mix, my formatting starts to slowly go out the window. I run this every now and then, it takes under 30 seconds. This is a command line formatter.

Go get the file from here or here

These links take you to http://astyle.sourceforge.net. The page at one of these links will describe the switches you can use with the command line formatter. I've chosen some that work for me to get your started.

1. unzip and find a file called AStyle.exe (windows) in the “bin” directory
2. put the file in the experts directory
3. open up a command prompt window (start>run>cmd)
4. drag the AStyle.exe file into the window
5. add a space then type this after the file name -A2 -s3 --mode=c
6. Add a space then drag and drop the file you want formatted, press enter
7. Done. You see the original was renamed with a “orig” extension.
How easy is that!

A New Forex Broker

Ever since MF Global went tis up, I’ve been on the hunt for a new broker.

Here's my deal;
I use Interactive Brokers, they don't do MT4 though.

I had an account with MF Global, through their Canadian office who were members in the Canadian Investor Protection Fund (CIPF). When they went tits up I didn't have to worry, the CIPF covered me 100% up to a million bucks, I got my full $$ back in the form of a cheque with the help of the courts and KPMG.
Then, I opened a mini account with Oanda a while back, found out they don't allow MagicNumbers and they write a reference number in the comment field. Never thought to check the demo account, I mean why would a criminal do something stupid like like?? Live and learn boys and girls. They suck because of that, money is being withdrawn.  Losers.

After MF Gobal
So now I needed a new criminal....

Rather than reading reviews, I first started looking for a criminal that actually had what I wanted, a little tougher here in Canada. I want a criminal to be CIPF registered. I found thehttp://www.friedbergdirect.com/ only by asking FXCM if they had a Canadian office. When I was using MF Global, they used Boston Technologies for MT4 as do FXCM. So I think I'll be OK with FXCM, I'm going trough the Canadian criminal, Friedberg Direct. Account opening is in progress.
I opened an account with PFGBest a while back, funding is in progress.

I called IBFX to ask them a bunch of questions and fill out my "criminal research sheet" and they said, since TradeStation acquired them, they don't accept Canadians. Now I hate TradeStation even more than I did 6 months ago.  They are scared of Canadian regulations, they can go f*#% themselves.

In the end this is how I want my accounts to be setup:

Interactive Brokers - trade ETF's (index) longer term and some futures (Asia)

FXCM - 0.01 lot size - EA's that have proven to be profitable and bug free on demo are promoted to this account on a low risk setting, trading Live. One reason for this is I notice demo services puke quite often, all kinds of errors and order time outs at normal times of the day. If this account makes $$ I transfer to an account with larger lot sizes. They also offer to reimburse for VPS, account minimum has to be met. I use my home PC right now with cable modem and low downtime - Pentium 4 humming along running 4 MT4's at a time, each with between 3 and 10 charts open.

PFGBest - lot size 0.1 - use for EA's that have graduated and proven themselves to be bug free and profitable. They have a Canadian office but I elected to use the US office and also trade futures. I'll probably change this to the Canadian office and ditch the option to trade futures. Still pondering this.

I’ve almost settled and I’m pretty sure I’ll be OK with PFG and FXCM. I want two separate brokers with 0.1 lots and 0.01 lots. When an EA show promise on demo it graduates

Wednesday, December 14, 2011

MF Global

I had an account with MF Global Canada, they went tits up as you are probably aware.  I actually got 100% of my money back, KPMG handled the deal!!.  The account was with the Canadian branch so I was covered under the Canadian protection fund that was set up years ago to deal with this type of non-sense.  So if you look at my forex performance, you'll see it has stopped trading.  I will be set up with a new broker and funded account by Christmas but I wont trade until January when liquidity is up.

Where is the market going?

Sideways has been the story for a while now after that monster rally that started from the #2 green arrow in area 2.  Notice price never actually entered area 2.  If you look at the chart of SPY (same day) it looks like a failed breakdown, and they say "from failed moves comes fast moves".  

The SPY looks like HigherHighs and LowerLows are in store for a while, but I'll use the QQQ chart to show where I think we are headed.  

Overall, I think we are headed to area 4 - we may bounce or we may crash thru - so the options are to go long at the top of area 4 or short at the bottom (essentially a breakout) for a shorter term profit. If we beak area 4, look for a re-trace back to it, then short.  Once we find ourselves down at area 3 I'm all long right there.

So - in the near term, I'm looking for a bounce at area 4 back up to about 55.50, then down to area 2.  If we take off from area 4 we might have enough steam to punch thru area 3 as this area has been softened already.

Tipster Trendlines for MT4

I use the Forex Factory and the Steve Hopwood forex forums mostly.

If your looking for the MT4 Tipster Trendlines code, go to Steve's site as I'm not posting it at Forex Factory any longer.


You have to sign up to be able to download files.


The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.