For UK traders only ... Let me start by saying I have no financial connection to Alpari, other than my FOREX account is with them. Alpari started doing Spread betting accounts about a month ago and I opened one which became available to trade this evening. Their website and staff don’t seem to know
EDIT: Whilst it seems to me that this Normalization used to be a problem, the experimental test indicators and scripts below have convinced me that this is not (or is no longer) a problem (at least with the latest MT4 and with my broker). The thread remains primarily for the indicator/EA below
Since MQL5 is now live with my broker I tried a speed test. Since I am a n00b at MQL5 I posted my code on the MQL5 forum to make sure I didn't mess up the test. https://www.mql5.com/en/forum/6475 On my test, the back test was 4x slower with MQL5. The Admin who tweaked my code has an awesome machine
I don't think this is a feature, more like a bug. I just spotted this on one particular EA I was testing. I tried 4 other EAs and three of them displayed Balance and Equity , with one just displaying Balance only. It's clearly not that the equity curve is hiding behind the balance curve, the top
I personally had never used StringConcatenate because it would have made my code less readable and probably wouldn't have save much time anyway. https://docs.mql4.com/strings/stringconcatenate "The StringConcatenate() works faster and more memory-saving than when strings are concatenated using
This script may or may not be of interest to anybody directly, but it does also show by example how to read the keyboard, which may increase its usefulness. Be warned that reading keys like this will take key presses that "belong to anyone". In other words if the key is pressed for any reason the
I wrote a speed test program for MQL4 extern int stops = 250 ; double lots= 0.0 ; bool buy= true ; int init(){ lots = MarketInfo( Symbol (), MODE_MINLOT ); } int start(){ static datetime lastTime= 0 ; if ( lastTime== Time[ 0 ] ) return ( 0 ); if ( OrdersTotal ()> 0 ){ // since
I have wanted to stop my indicator auto-scaling on the M1 time-scale as the result is more difficult to read. The ... #property indicator_maximum 5.0 is no good as it just scales the top of the window to that fixed value rather than using it as a minimum limit of the top of the window (which is what
Here is my self-destructing EA. The idea is that when it is finished doing its job, it removes itself from the chart. And it does do this very nicely and in not too many lines of code. // Using any sort of PostMessage is a HACK and not recommended, but for otherwise unsupported functionality it can
Having been directed to an old post about making MT4 do what you really want, https://www.mql5.com/en/forum/124688 the code below was my first effort. Since it is a weekend (with no incoming ticks) I thought I would put the code in the EA init function. What is interesting about this code is that by