Forum

ArrayResize() question

If i resize an array which already contains data, will this erase all data or just add an extra slot? i.e., is ArrayResize({1,1,1},4) = {1,1,1, NULL}

Simple Question regarding ArrayMaximum (and ArrayMinimum)

I have a question regarding the ArrayMaximum / Minimum functions . The documentation is not clear as to whether or not the arrays are read from right to left or left to right. For instance, say i want to record the maximum of elements 6,7,8 in the following array: array[ 10 ]={ 0 , 1 , 2 , 3 , 4 , 5

Microsoft C++ AMP

I'm interested in parallelizing parts of my EA in the GPU using the new C++ AMP programming model <amp.h> Is there an <amp.mqh> library somewhere, or do i have to do this via external DLL

yet another iMAonArray question

I thought I solved this a while ago, but while troubleshooting my code I thought it might be a good idea to validate all my assumptions, and iMAOnArray is one function for which the documentation is outright confusing. Say i have built an array tmp[1000], which gets filled left to right, i.e

How to draw custom Monte Carlo indicator into the future

Hello, This is my first post. I have been reading these forums for a while in order to gain some insight on mql4 programming. My earlier programming experience was in C++ and VBA (if you want to call that a programming language). I'm glad that mql is so similar to C++, certainly makes things a bit

Monte Carlo based EA

I just finished backtesting my Monte Carlo based EA, and the results are encouraging enough to start forward testing. I've put this up on a blog and I'm broadcasting the forward test live. Granted, it may be days or weeks before any trading, but there it is nonetheless. This is not a scalper or some

EA not closing trades as instructed

I have the following code that executes at certain times when i want to exit all open long positions (and another one for short positions) void CloseLongs() { for ( int pos = OrdersTotal () - 1 ; pos >= 0 ; pos--) if ( OrderSelect (pos, SELECT_BY_POS) && OrderMagicNumber() == magic ) {

EA entering only sporadically on Alpari UK

I'm testing an EA on an Alpari UK demo account and I'm seeing some very strange behaviour. Some times a market entry is triggered, which i can confirm via a print statement just prior to OrderSend(), but the order does not go through for some reason; it's as if it was never placed (no error messages

How to draw curves with my EA

I have an EA that produces an array of future prices. I'd like to be able to plot these on the chart to ensure the EA is working properly. Is there any way to do this, similar to loading the array into an indicator buffer -type object, or do i have to draw a bunch of small lines with ObjectCreate

MT4 conditional statement impossibility

Consider the following: if ( t2> 0 && (t2>t1 || t2>t3) ) l= 5 ; I have seen this statement return true when t2<0. It seems to me this should be impossible, unless MT4 is disregarding the parenthesis altoghether. This really shakes a fundamental assumption i had made about mql4. Does anyone know how