Hoi Cheng / Publications
Forum
.chm file in MT4
hi, I'm using MetaEditor and MT4 via Wine and whenever I try to use the offline help, it crashes everything. Where would I locate the .chm file within the MT4 folders? I would like to access this with a CHM viewer. Thank you
What is the proper application of Classes in MQL4?
I've been coding for about a year now but I've coded from a procedural paradigm. If this then that, if price does this, modifyOrder that, so to speak I noticed that MQL4 also can be an object orientated language but I just cannot conceieve where would object orientation apply to algorithmic trading
all declared arrays into a list of arrays
Hi, at the start of my program I am declaring a bunch of arrays, and they all increment in size +1 per tick and they all maintain equal size to one another. double array1[], array2[], array3[], ..... , array99999[] void OnTick () { ArrayResize (array1, x+ 1 ); ArrayResize (array2, x+
Execute after the last Tick
The OnTick() function is driven by the receiving of a new tick. But what if I want to execute a block of code immediately after the last tick of the trading week, long before the first tick of the following trading week? Any suggestions on how this can be done? Thank you
Passing array name to function
Hello, I'm writing a function that utilizes FileWriteArray to simplify the body of my code as my program will need to utitlize this function serveral times. I am getting the errors: "bidArray - parameter conversion not allowed" "bidArray - invalid array access " The error is very likely related to
TestGenerator current spread
It appears the strategy tester actually uses the current spread from the broker but we know that the spread can change throughout the day. Is there anyway to declare the spread within the code, I would be interested in setting the spread based on time to simulate variable spread. thank you
Error 5002
Hi , I am getting error 5002 from trying to write this filename: filename = IntegerToString (AccountNumber())+ ": " + Symbol ()+ " " +date+ " - ask.bin" ; file_handle= FileOpen (filename, FILE_WRITE | FILE_BIN ); if (file_handle!= INVALID_HANDLE ) { FileWriteArray (file_handle,ask, 0
timing loops
I may consider running a lengthy For loops in my code. Is there a function or something within MQL4 that allows you to time a block of code like %%timeit in a ipython notebook? Thanks
MQL4 Language Fluency
A friend of mine brought to my attention the best way to learn a speaking language is just learn the 2000 most commonly used words. I've seen him pick up local languages with high competency in impressively short amounts of time. So I'm wondering what are the most commonly used functions that will
WebRequest() cannot be executed in the Strategy Tester.... or can it?
I'm running a strategy in the tester where certain actions is supposed to call the WebRequest function and send me a Telegram message. In the MQL Reference manual, it clearly states " WebRequest () cannot be executed in the Strategy Tester " on both MQL4.com documents and the offline manual, so I