Forum

ObjectFind always true.

I've been away a while.. lots changed! But today I'm getting ObjectFind return "true" when there is no object with that name... void OnStart () { if ( ObjectFind ( 0 , "456" )) Alert ( "found: 456" ); else Alert ( "not found: 456" ); return ; } You get the same

Data Type limits

Just found exceeding the data type max and min values doesn't trigger any kind of error message... just silently wraps around :/ e.g. int a = 2147483647 ; int b = a+ 1 ; //b is -2147483648 !? Are there are any simple ways of safeguarding against this

EA slower processing ticks than Indicator

Hi, I used simple code to write the ticks to file and found that indicators wrote more ticks than the same code in an EA. I used two EURUSD M1 charts in the same instance of MT4. I swapped the charts and got the same results Here is the results from indicator next to EA: And here is an indicator

DLLs and passing control

Is there a way to call a function in a DLL file (I'm using C++) and let it run while MT4 retains control. Specifically, it's for a tick collector. I would like the DLL to periodically write the logs to file, but I don't want to miss any incoming ticks during the open/write/close process. If not, the

Backtesting: pattern finding, any ideas?

Hi all, hoping for some input on this from your experience or viewpoint. After a getting results from a parameter sweep, how do you analyse the data to find 'patches' of good results. I mean, if you have a good set, but change one parameter slightly and suddenly the results are bad, I think it's

Anyone experienced 4055 (ERR_CUSTOM_INDICATOR_ERROR)?

A custom indicator generated this error but unfortunately it's one I gave to my friend and I've ben unable to replicate it myself. The very general error description doesn't really help with where to start looking for this. Has anyone else experienced this error or have any tips on what it's

Cross rates

Hi all, I'm trying to calculate a cross currency price from two majors. I get close but not exactly. The broker is variable spread. E.G. EURUSD bid:1.35000 ask:1.35002 GBPUSD bid:1.59290 ask:1.59297 EURGBP bid: 0.84747 ask: 0.84756 dividing the bids I get: 1.35000 / 1.59290 = 0.84751 dividing the

While loop in crashes when reopening MT4

In many of my indicators I record data in folders organised by brokers. I just 'improved' my code for getting the broker name. If I add the indicator, no problems. However, if I close and reopen Mt4, it crashes. Can't see the program, CPU 100%. If I delete the ex4 file, reopen Mt4, compile and add

OrderSend / OrderModify live processing times

Well. Stage 1 of my MT4 life is complete. I have an EA that earns a good profit on demo accounts. But I think it's too good to be true as profits are directly affected by the brokers' processing times of OrderSend and, in particular, OrderModify. Am I right i assuming processing times are

efficiency of user-defined functions

I think somewhere in "The Book" if says having user defined functions is slightly less efficient (but much clearer to read and program). I'm wondering if I can use user defined functions while writing the EA, and then, when it's time to compile, copy and paste each function in place of the function