Michael
Michael
Michael
Added topic Why is Metatrader always one candle behind?
So, take the following code. Load it up on a chart of your choosing (except AUDJPY), any pair any time frame (I'd recommend 15min or greater).  Let it run so you at least get a few candles in.  Make sure whatever timeframe you choose, you
Michael
Added topic Indicator re-draw problem
I have an indicator that draws horizontal lines on a chart based on swings.  Now, the math works every time (Comment() shows the values).  But the indicator isn't re-drawing when it should. Can anyone tell me why? Note: the functions
Michael
Added topic Looking for High/Low based on Moving Averages.
I'm looking for a way to find the last high and last low based on moving averages.  The arrows in the attached image show what I'm looking for.   I don't use the current moving average trend.  I look for the last swings.  I've
Michael
Added topic Getting list of symbols in Market Watch window - Giving back
Well, thanks to the latest builds (600+) of MT4, we can now easily get this information. Here's the code: void OnStart ()   { //---    int HowManySymbols= SymbolsTotal ( true );    string ListSymbols= " " ;   
Michael
Added topic Struct arrays not allowed?
Well, If you put the following code into a script and load it up on a chart, you won't get the correct time value.  Why? int start()   {    struct OrderInfo      {       
Michael
Added topic When would this statement be false?
Ok. So, in my quest to find the perfect new candle code, I tried something new. Price based! if ( Open [ 0 ]== Close [ 0 ] && Close [ 0 ]== High [ 0 ] && High [ 0 ]== Low [ 0 ]) Alert ( "New Bar!" ); I put this in an EA and loaded on
Michael
Added topic MT4 and UAC. Oh what fun! -Attention MetaQuotes
Don't try this on a 'live' trading machine. If you currently run MT4 w/out the /portable switch AND you have UAC turned on, turn it off and restart you system. What will happen? Well, MT4 will load as if you put the /portable switch on. Now, go turn
Michael
Added topic Error description: possible loss of data due to type conversion
I've got a couple of them where I'm getting this and I'm lost. 1st up: int myDigits = MarketInfo ( Symbol (), MODE_DIGITS ); Now, help text has some sample code that leaves me to believe either I'm not reading it right or I'm loosing my mind
Michael
Added topic New candle
Anyone got a good piece of code for build 600+ that will determine if a tick that came in is the start of a new candle or not? The code I have doesn't work anymore
Michael
Added topic Time arithmatic
I'm getting a headache from trying to figure this out. Code:    datetime Diff= Time [ 1 ]- Time [ 1 + 1 ];    int iDiff= TimeSeconds (Diff);    Alert (iDiff); Needless to say, I'm trying to get the integer value of the
Michael
Added topic expression has no effect
I'm getting this warning on this line of code: intCount[intArrayElement++]; Now, I know this gives me the desired affect; it worked in prior builds of MT4. I'm just using an array to count the number of instances of patterns. It's just a warning, but
Michael
Added topic Daily Profit procedure
I'm looking for a procedure, mql4, that will tell me true or false, when I've hit the daily profit limit for a pair. I've tried the folloowing code but it always returns false. bool funcGetTodaysProfit() {    int intDailyProfitPips= 100 ;
Michael
Added topic DLL freezing or locking up
I have a DLL that exchanges data between 2 instances of MT4. It works for about 5 mins, then the DLL locks up; i think. All I know is the data is "frozen" in the MT4 terminals. I'm attaching the experts (1 for each terminal) the cpp and def
Michael
Added topic DLL or MQL
Here's a question. Which would be preferrable: 1 EA on each pair that you trade (same EA), 30+ symbols. Or 1 EA on one chart that loops through all the symbols. Notes: Symbols are all independent, in other words, they don't rely on data from each
Michael
Added topic mt4 dde problem
This one is odd. i can get gbpusd, gbpchf, gbpjpy, eurusd, eurchf, eurjpy, usdchf, usdjpy but I get N\A when I go try eurgbp and chfjpy. now, the commands are correct: =mt4|bid!eurgbp and etc. How come I can get the other symbols, but not these 2
Michael
Added topic datetime issue in Order Send and a 130 error
How do you put the date in for expiration in the OrderSend function if your using a 'pending order' command? If I replace tmpTime+3450 w/ 0, it works. I also get an 'invalid stops - 130' on my order modify. Anyone got any ideas? I'd appreciate it
Michael
Added topic Zero Divide Error
It must be late and I can't find it. It's in an indicator, that when loaded on a chart, it works fine. But when I call it from an EA I get Zero Divide. note: I have called this from 9 other EA's. Each call gives me the same result in the Journal for
Michael
Added topic It boggles the mind
Ok, I get the need to take MQL5 into the realm of nearly OOP.  Heck, I even understand the need to go to a more 'sectionalized' approach, ie. libraries.  But what gives wil STILL not supporting .Net?  Why oh why do you STILL need
Michael
Added topic Which comes first, indicators or experts?
I have an indicator that sets some global variables. I have a few EA's that use the global variables. Will the indicator execute first, then the EA's or are they done at the same time? The EA's are on many different pairs. Thanks -Non
Michael
Added topic What is "scale fix"?
On the common tab of the property 's for a chart there is an option of "Scale fix One to One". One what to one what