- Search Metals Mine
-
7bit replied Jul 12, 2010No, it did not work. Cant you see that there is absolutely nothing logged? Have you enabled dll calls? 8 arguments means you can call this function with up to 8 arguments, one argument minimum and up to 7 more optional ones. Please read my posting ...
Better alternative for Print() for debugging
-
Better alternative for Print() for debugging
Started Jul 12, 2010|Platform Tech|30 replies
Put the following into your code #import "kernel32.dll" void OutputDebugStringA(string msg); ...
-
7bit replied Jul 12, 2010you must be doing something wrong. This loop will count to 9999, it will not stop at 200. But it will not be triggered very often, chances that you ever receive a tick with a timestamp of exactly 2010.06.01 00:25 and 0 seconds are not very big. What ...
Help with MaxCount
-
7bit replied Jul 11, 2010One thing I forgot to put into the indicator is: IndicatorDigits(Digits); in the init() function to set the number of digits that are displayed in the data window. Despite the claim in the documentation that it would be initialized with the value of ...
Creating Metatrader DLLs with Lazarus / Free Pascal
-
7bit replied Jul 11, 2010Just found this which might be relevant for the problem with the .dll being outputted as .exe url
MT4 DLL Memory Pollution
-
7bit replied Jul 11, 2010All the date and time functions commonly use a type that is called TDateTime. TDateTime holds some sort of a timestamp in a Double value. It is not exactly a POSIX timestamp but it has similar advantages, you can add, subtract and compare dates: ...
Creating Metatrader DLLs with Lazarus / Free Pascal
-
7bit replied Jul 11, 2010A better example of the moving average indicator or of an indicator of such a type in general has been requested in this thread and here it is. Attached are the Lazarus Project and the mql4 source and additionally I post the source code here in the ...
Creating Metatrader DLLs with Lazarus / Free Pascal
-
7bit replied Jul 10, 2010Also a few postings ago you wrote that the dll example worked with lazarus, so you must have changed something in the meantime. If you completely messed up all settings try to restore them all to their defaults, maybe even do a fresh install if ...
MT4 DLL Memory Pollution
-
7bit replied Jul 10, 2010The .lpi and the .lpr are the ones that contain all information, the other ones are generated. Regarding your screenshot: I cannot see anything there. Please turn off the hiding of file name extensions in your windows explorer. How can you ...
MT4 DLL Memory Pollution
-
7bit replied Jul 10, 2010If you want to further decrease the code size look into the project options under "Linking" turn off all debugging info and line numbers and turn on "strip symbols" for the final release. Also always enable "smart linking" and "smart linkable". This ...
MT4 DLL Memory Pollution
-
7bit replied Jul 10, 2010Lazarus is quite stable. The creators of Lazarus are perfectionists striving for perfection. It seems perfection for some of them is defined as V1.0 but every perfectionist also knows that perfection can never be reached, so I think they will be at ...
MT4 DLL Memory Pollution
-
7bit replied Jul 10, 2010Did you try my suggestion with ansistring(y) instead of y? You could also try to declare a variable of type ansistring and fill this variable with ansistring(y) and then do the string concatenation with that variable instead of using y directly. It ...
MT4 DLL Memory Pollution
-
7bit replied Jul 10, 2010No, of course you can pass strings around, you just have to do it right. This simply means there is something wrong. Either with my example or with what you did. It actually returned a string, the "hello" is ok and also the number 42.3 was converted ...
MT4 DLL Memory Pollution
-
7bit replied Jul 9, 2010One thing I completely forgot to ask: Why are you using strings for this purpose at all? All fields in the order list can be stored in doubles (the intergers also), the only exception is symbol and comment. You could either complete leave the ...
MT4 DLL Memory Pollution
-
7bit replied Jul 9, 2010it should work somehow. I currently don't have my windows/mt4/lazarus installation working, so I cannot try it right now. Why are you trying to resize the array? Technically your dll should receive a pointer and the array is still in metatrader's ...
MT4 DLL Memory Pollution
-
7bit replied Jul 7, 2010Yes, this is the clean way to do it. But you should use LongInt. In my above example I just silently let the typecast happen when the function is imported to mql. The mql "thinks" it is calling something that accepts/returns int (int in mql4 is ...
MT4 DLL Memory Pollution
-
7bit replied Jul 7, 2010I do not even explicitely cast it, I simply declare the function so that it takes a pointer and/or returns a pointer and since I know that 32 bit pointers and 32 bit integers have the exact same representation in memory and on the callstack I simply ...
MT4 DLL Memory Pollution
-
7bit replied Jul 7, 2010I have seen somewhere in the oanda forums a posting by somebody who did almost the same (manually on the oanda platform). This posting was iirc from 2007 or so, there are some old threads about grid trading. He called his invention "burst grid". I ...
Snowballs and the anti-grid
-
7bit replied Jul 7, 2010this would require some non trivial amount of rewrite in the code and I don't see any benefit for doing it. Until proven otherwise I continue considering "stop hunting" a myth. The stop line should always trigger. how far did price go over the line ...
Snowballs and the anti-grid
-
7bit replied Jul 6, 2010This is one of the things I will eventually try to figure out how to do it but I did not yet start with the experiments. Also there might be subtle differences between Delphi and Lazarus: While the VCL and the LCL (the widgetset libraries) are ...
Creating Metatrader DLLs with Lazarus / Free Pascal