Download MetaTrader 5

MQL4 and MetaTrader 4 - page 675

To post a new topic, please log in or register
& how can i get it work   int Cnt = 500;  double TestArray[Cnt]; this is the error i get
I've developed trading systems on other platforms for over 10 years. I had 12 years of experience working with Tradestation and I've used several other platforms. If I backtest a system in Tradestation, I can be 99% sure that (other than slippage, fills, etc) it would have traded in realtime...
Hi, I am new to MQL and looking through the book and I was looking at the code in the example for a simple expert advisor (https://book.mql4.com/samples/expert) in the 4th block // Orders accounting   Symb=Symbol();                               // Security name...
something has changed in MT4 for me with any EA attached, it makes a noise every pip which sounds a little like a telephone ring. there is nothing in the code to cause this. Can someone help me stop it ?
  moving SLs (14   1 2)
Hey there, though I am aware that there are lots of threads out there that cover this problem I just wanted someone to have a quick glimpse on my particular approach to the "moving SL after price has moved XY pips in my favor" and give me a hint as to why it is not working properly. Not working...
Patrik Polak
Hi all. I need change maximum open positions at one time, from 1 to infinity. What i must change in this code? Thank you :-) int BarCount;int Current;bool TickCheck = False;static bool ITradedOnThisBar;//+------------------------------------------------------------------+//| expert initialization...
I am running my EA on Demo, but I am unable to make any progress at the point where the existing market order is instructed to close. The instructions from the strategy are being generated correctly at the start of each new bar and my various alerts are as follows: Number of orders=1 Ticket=2426438...
Would it be possible to create an open-ended rectangle i.e. a rectangle without the second time coordinate or an raylike infinite time projection? I originally thought about creating two horizontal lvls and filling the space in between with a background color but since that isn't possible in mq4 I...
  iHighest and iLowest (11   1 2)
Hi, I was trying to get the highest and lowest prices out of a group of pre-calculated prices and was wondering about the how. I assume it is done by arrays but I'd like to know the exact procedure. double someprice, someotherprice, somemoreprice, evenmoreprice;//then some calculations to get those...
Hi I am having problems with the re-entry logic of me EA. Ittrades continuously, I want it to do the following please. Assume Long entry criteria obtained... once long entrylevels are reach, trade must close based on TP or SL then: 1)say (x) level is reach for entry, then EA must onlyre-enter long...
I have written an EA and get the most mystifying results from a piece of code that i have written. It works well with Buy orders but refuses to work with Sell orders. I have gone through the system code a hundred times. Even rewritten it - but the same un-explainable result keeps on happening....
OK, so MAYBE I AM slow! But I can NEVER find any new private messages that I get. I can find everything else but! )< 8( So if someone will kindly just point me in the right direction..... -=>
Understandably, utilizing different Optimization date ranges gives different results. But how to figure out which results to use? Each different Optimization set gives different back test results. Again: understandable. So one takes one set, lets say from very long range ~ 5+ years and runs it...
Welcome! I am a newbie in MQL4. I tried to create custom indicator for (this indicator "THV3 Trix v4.01 Div.ex4") Draw Up Arrow in Chart Window: Cross-Lines to UP Draw Down Arrow in Chart Window: Cross-Lines to DOWN These my try: There are two problems 1- UP arrow is repeated more than once 2- Down...
I wrote some code for this guy, it writes code to a file.example: FileWrite(handle, Minute()); but he says he doesn't want access every tick but by interval. Is there a way to specify how often something is written to a filewithin start()?
Hi brothers, need hlep . if someone can help me to add Back Test feature to this indicator ......!!! this indicator comes with alert, what i want is to add arrow to the chart when ever alert is accure ..!! so when i do a back test later on i will find those arrows indicating there was alert(signal)...
Hi Everybody, does anybody know a good description of how to loop through minute values in mql4, way back in time, like 10 years. It should be done as an analysis of an indicator which means it should not be too slow. Thanks for your help, Jacob
Hello, I need your help. I have an Array called A[6] which has 6 values in it ( A[0] = 0.5, A[1]=1.0... ) . I want to transfer these data to another array - B[6], so B[0] should be 0.5 - A[0] - and B[1] should be 1.0 - A[1]. Do I need to transfer the data from array to array by a mechanical...
Hi guys, I have created a new MACD indicator. The MT4 MACD isn't standard, even though it is calculating its values (MACD & signal) correctly. Some say it isn't. The difference between the standard version and the one of MT4 is in the way each of them plots the MACD value. The standard one plots a...
Good day every one out there using MetaTrader 4 I am a beginner in this field but would like to know how to use the metatrader platform at its limits. Where do I begin in the basics of mettatrader Please help
  Error 129 on OrderClose() (13   1 2)
Hi guys I have a serious problem I cannot fix: When I try to close a SELL operation by EA, I get always 129 error. I post the code: Alert("Attempting to close the ticket " + ticket); RefreshRates(); if(OrderClose(ticket,0.03,NormalizeDouble(MarketInfo(OrderSymbol(),MODE_ASK)...
Hi, I want to program an EA which is buying or sending a limit order at a defined time. Now my question: Is it better the EA is in a while-Loop all the time or is it better it worked with ticks? Or to say it in another way, does it change anything in a while-Loop, because I think the brokers...
I have been working on an EA for MT4 platform and need help with the code. If some one would be so kind I'll send you what I have and you are more than welcome to use it. I don't want to post it on here for the world to see incase I decide to do other things with it or destroy it all together. I may...
I have a problem with straddle orders. The Buy stop places orders but the sell stop does sometimes. I have a condition on the straddle orders that it will try to place the orders until both buystop and sell stop are placed. if( (Hour() == start)&&((buyEU == false)&&(sellEU == false))&&(OCOsetEU ==...
After submitting a limit or stop order, how do you know when it is executed? Would OrderOpenTime() gives an invalid datetime if it was pending? Thanks in advance.
how to find the RVI crossing candle HIGH & LOW ?
I've been developing code on other platforms (Tradestation, WealthLab, etc) for years, but I'm new to MQL. Haven't learned the "tricks" yet, and I think that's biting me. I have a fairly complex indicator that seems to work. Sometimes. And I can't figure out the "sometimes" part. E.g.: I compile...
I have a problem I have a simple EA which trades when two moving average indicators cross - simple enough. I want to use this on the hour candle and the problem I have is that if the trade condition is true, the trade will occur - which is fine. If the trade stops out - this is also fine either at...
Hello, I am using your advised code snippet     if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; } But I haven't really...
Hi folks,just want to introduce a an amazing EA that developed.It is a product of about 3 years constant monitoring of price actions.The concept is based on the observation that only the current candle has the answer to the direction of the market .This wonderful EA is a very effective market...