Hello,
7-bit I have 2 questions:
1) Any plans for MQL5?
2) Can I somehow use mt4Rdll to use under Linux? MT4 is conducted under wine and I am using Linux native R.
Hello,
7-bit I have 2 questions:
1) Any plans for MQL5?
2) Can I somehow use mt4Rdll to use under Linux? MT4 is conducted under wine and I am using Linux native R.
I have a concept for my queries, but anyway your library convince me to think. My queries are obsolete.Originally Posted by ;
As soon as I attempted to complied the mt4r.mqh document I had the subsequent erroes:
Start function not found and cannot be run.
Function RInit is not referenced and will be removed from exp-file
Function StartR is not referenced and will be removed from exp-file
Function StopR is not referenced and will be removed from exp-file
Function Rx is not referenced and will be removed from exp-file
Function Rs is not referenced and will be removed from exp-file
Function Ri is not referenced and will be removed from exp-file
Function Rd is not referenced and will be removed from exp-file
Function Rv is not referenced and will be removed from exp-file
Function Rm is not referenced and will be removed from exp-file
Function Rgi is not referenced and will be removed from exp-file
Function Rgd is not referenced and will be removed from exp-file
Function Rgv is not referenced and will be removed from exp-file
Function Rp is not referenced and will be removed from exp-file
0 error(s), 14 warning(s)
anyone know what was the cause for it?
i am running it under windows 7 32bit and R 2.13.1.
thanks.
7Bit, fantastic job on producing mt4R.dll. I have cobbled a wrapper for VB6 up for my private use. Maybe I will make it available if anyone is interested, if I get some time. I'm beginning to find the options of R but've encountered a few problems in making a full working translation of mt4R.mqh.
The two matrix routines RAssignMatrix and RAppendMatrixRow are giving me problems. It may be that Pascal and VB6 matrix constructions are incompatible for multi-dimensional arrays, or more probable that my infantile understanding of R / Pascal and they manage arrays/matrices is your issue. Case in point: I do not even know how to test matrix / vector boundaries within R.
I guessed a workaround with RAssignVector, and then mixing a temporary vector in an already dimensioned matrix in R one column at a point: Inserted Code Rx(multiA#91;,1#93; lt;- tempA) reproduces tempA to column 1 of multiA. Repeated in a loop, this approximates the functionality of RAssignMatrix.
It seems that RRowBindVector(), that is mentioned in the RAssignMatrix remarks of mt4R.mqh is not found in the mt4R.dll source code. Is this just an allusion to utilizing the Inserted Code * factor lt;- rbind(variable, vector) command within R or a function which didn't yet make it to the DLL?
7bitI see you've made this way to use R. I made an R program that forecasts the price later on, and comes with the proper amount to exchange. It trades 7 currency pairs at once. It runs after an hour. It makes a table with all the trades I need to do I manually input them.
I Would like to automate it onto a broker. It looks like OANDA would work, they've a Metatrader platform, and I have used a clinic account for awhile today.
My problem isI have zero experience with MQL4, or any other programming languages. I don't know where to get started. I can't do that all of the time, although I had been testing it out on OANDA manually. Would you be willing to help me out to get my program automated?
Being a new memberI don't know if I can respond to personal messages, but should you need my email, I will provide it to you. Thanks.
That is an interesting idea. The method by which in which the dll was created (a simple horizontal C-like interface) it should be simple to use it with a lot of different languages which can interface with native DLLs.Originally Posted by ;
The arrangement that is used is the one which is dictated by the way the 2-dimensional mql4 array resembles, there's not anything special about Pascal types, they're just like C types on the lowest machine degree and therefore are laid out the same.Originally Posted by ;
In C it could be a double * foo and you might dereference it with foo[x], in Pascal you essentially do the same with a fooDual, the syntax is different (simpler for humans, more natural, simpler ( less ambiguous) the representation about the machine degree is precisely the same as the equal in C.
The matrix (or 2-dimensional variety ) for example:
1 2 3
4 5 6
7 8 9
will be reflected in memory just like a horizontal 1-d range:
1 2 3 4 5 6 7 8 9 (at this point without looking into the code now from the top of my head I'm not 100% sure it might also be transposed):
1 4 7 2 5 8 3 6 9 (but that can easily be discovered )
and actually in my dll I'm passing 2d arrays because 1d arrays and 2 variables defining the row and column count.
Passing a range (no matter how many dimensions) to the dll from mql4 means passing the pointer to a memory block comprising such a horizontal row of numbers, each number as 8 byte double, no header, no separators, only the numbers. 9 elements' above mentioned example matrix could be passed as a pointer. An 1D range would seem the exact same, its row and column count that tells my code how to read it.
I'm not sure how in VB a 2D array is coordinated, if it functions the same way it should be possible there too. If the 2D arrays are somehow structures than described above then you might attempt to create the matrix a one dimensional array and move that to RAssignMatrix along with the row and column count.
That is perfectly ok if it doesn't produce a performance bottleneck, RAssignMatrix() needs to be faster but this is dependent upon how big the structure is (it'd be *much* faster with very big matrices) and just how slow or fast the rest of the code is to make this a significant bottleneck.Originally Posted by ;
I have changed the API several times and removed and replaced a few functions, most likely I forgot to alter this remark and it is still referring to a older version where this function still existed.Originally Posted by ;
___
[edit:] double has just 8 bytes of course, I confused it with something different. An individual can certainly forget (and also safely ignore) this when using a language with strong typing and typed pointers rather than being forced to mess up with void pointers all afternoon long.
q1: yes. Write to the .hst file and send a tick to the chart window to update it. Should work.Originally Posted by ;
Q2: the spread has been managed somehow differently. To decide on a diffferent spread for backtesting you have to disconnect MT4 from the net so it cannot call home and ask for the current spread then modify a file in the history folder, there should be a few threads about this here and on mql4.com.
It cannot start the RTerm.exe, be sure the route inOriginally Posted by ;
extern string R_command is right (the model number changes from time to time), check it very closely and when R is installed and the path is right it should function.
You need to use the 32 bit compiler (download the 32 bit IDE, it includes the 32 bit compiler), MT4 itself is a 32 bit appliion and can only load 32 bit dlls. In case you used the 64 bit version of Lazarus/FPC binaries would be produced by it by default and this wouldn't work with MT4.Originally Posted by ;
You can even setup cross compiling from within precisely the exact same setup (if you plan on using Laz/FPC for other projects also, but the setup is more complied, I have not done this). And for MT4R it isn't feasible, it's strictly intended to be windows.
The fantastic news is that 32 bit appliions run just fine on 64 bit windows.