Forum

Noob - Use indicator in 1 tick, but is processed in all ticks?

Hi there, Just a question to make me understand for a bit how Metatrader works. I am confused about how the indicators are used. So any clarification I can get is more then welcome :) Question: I notice that for example, if I call the MA indicator just once in my entire EA, it will still show up

Get current file name inside Class

Hi there, To prevent some boilerplate code, I want to read the file name, of the file a class is executing in.. There is no default MQ4 function available, but it should be possible with a native windows function (GetModuleFileName kernel32.dll) Source -

Best practices - Running multiple scenarios and multiple custom indicators in 1 EA (Event driven?)

Hi there, Its mostly a theoretical question (but example code is always welcome). The real question is: how to correctly code the 'frame' of an EA that tests multiple scenarios from multiple custom indicators? The way I'm (busy) building an EA, is not very much focused on 1 strategy, but is gonna

MQL4 prepend value to array

Hi there, This is my first post, so I hope its gonna make any sense :) How can I have a reversed Array (like a timeseries), and prepend a new element into the Array and throw the last one out (if over max-length). So Array[0] is the newest value and Array[49] is the last value.. I tried like this

How to get multiple indexbuffers from iCustom

Hi there, When you call the iCustom function to a (custom) indicator, somehow like this -> TrendDirection = iCustom ( NULL , 0 , "_trend" , 0 , 1 ); You get only 1 indexBuffer from inside the indicator.. But what if you want more data from the indicator? Lets say indexBuffer1, indexBuffer2

Backtesting a multi-currency EA

Hi Guys! I just cannot find any good info regarding backtesting a multi currency EA. I keep getting errors saying: "loading of iSpy (GBPUSD),M15 failed" It compiles just fine! Is it impossible to backtest a multi-currency EA?? Here is some code