
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Here's mine minus the actual trading logic.
And my correction for RaptorUK's comment:
I modified the Polyline code to allow overlays, ..
TLne Backwards compatible:
To draw on the sub chart just use iWin = WindowFind("indicatorName");
From a post about indicator drawing on both main chart and sub chart, TLine could be used for both with modifications.
To draw on the sub chart just use iWin = WindowFind("indicatorName");
Thanks
Market close time.
I wanted to close all orders before end of the week (market close Friday,) to prevent loss should the market gap over the week end, by passing the SL. (This is not modeled in the tester.)
So the question is when does the market close (or open.) All of the postings and searching on the net are plain wrong. From Forex Education - Introduction to Forex - IBFX Forex market operates 24 hours a day, 5.5 days a week (6:00 PM ET on Sunday until 4:00 PM ET on Friday) That's ET - New York local time.
This means that All postings depends on when they were made, as DST boundary's varies from year to year.
This means that it is necessary to compute when NY DST starts and ends, for the bar in question. (For back testing we need values to 2000 at least.) The problem is that Windows does not provide conversion routines except between the current TZ and UTC and only for the current year. If the PC isn't on ET it can't be done directly. Further more, until Windows8 comes out, you can't get conversions for ET and prior years. And looking at the Registry on Win7 the values only cover 2005 on (and those were wrong if I read them correctly.) So I'm not betting Win8 will be better.
This means that it is necessary to compute DST myself. I've updated my code: TimeGmt() and LocalTimeGMT() with default arguments, some additional documentation, and checks, and wrote code to compute market close time. Enjoy.
These are good points, there are many more things that are a guesswork even with MT4 functions, which not always return the correct value. For example broker and serverinfo on server and trading parameters, like variable spread, ECN or not, SL required or not turns out only from error handling, symbols info, etc.
Many of them are simply basic things which can not be (and should be) easily checked. For example info on opened charts and history data, time info (like GMT, timezone, DST), market open, close info.
Disaster Recovery would be really good, starting with MT4 not shutting down and restarting as it wants to (update), also terminal.exe proper shutdown, which stays frozen in task manager even hours later than the terminal was closed (and thought to be closed properly with close button without any error message).
Some kind of local datacenter support would be also good, it would make work easier instead of limited global variables and opened files. Not to mention storage of ask, bid, (spread) tick data which is missing.
There are many simple missing things which make life much harder together, and is an awful amount of work to handle them correctly if possible. Many external tips nad tricks even hacks are needed for extensive proper operation. I don't blame anyone who publishes a strategy on codebase and not handles all the possible (many of them broker-specific) problems with MT4 or the server - especially when the point is on the strategy not on error handling.
Even very simple things are missing, we cannot handle logfiles which can easily grow hundreds of megabytes or larger when something goes really wrong. They grow until the disk is full and nothing can be done, not even an optinon in the terminal settings on logfile handling.