MQL4 and MetaTrader 4 - page 248

Hi there, I've been looking at the adding the custom indicators as a resource to package up my Expert Advisor into 1 package. It all seems to work fine with one caveat... it's sooo slow. My Strategytester now runs a fraction of the speed compared to when I addressed the Indicator in the Indicators
hi, i have a variable in the ontick which is based on a moving average so it keeps on changing (and thats good) I know I can't use it in a function since its not global, but if I declare it globally the value will be fixed to that when it was first loaded. for now i'm reclaring the varible both in
Lets say our criteria for movement is that it will be movement if its over 250 pips
Hi everyone, I had a MQL4 strategy based on the ticks but unfortunately I needed the duration between two ticks. I thought that GetTickCount() did the job, but I have just understood the GetTickCount relies on the computer time, so at each run of the same test in the same interval of course I don't
Hello I have this code that adds a fibonacci configured with risk / reward .. but I need it not to be added when adding the EA to the chart as the code currently does, I need the fibonacci to be added to the chart when I use the buy or sell button so I wanted to know who can help me with this code
Hi guys! 1)Can I have an example of stop at breakeven? 2)In the backtest, the breakeven works, but in real it doesn't work, why? Thanks. Marco
Hi is this even possible in mql4 ? Being able to comment/uncomment lines within the file depending on the result of some lines somewhere within the same file? for eg: if ( x) { comment lines 25 - 30 ; } else { uncomment lines 55 - 58 ; } or How this/similar can be achieved with use of any device
As customary, many of us will use: SymbolInfoDouble(NULL,SYMBOL_BID); or SymbolInfoDouble(NULL,SYMBOL_ASK); or MarketInfo(NULL,MODE_ASK); and those will work ok most of the time, however, for some of us they return 0 while implemented in the Strategy Tester. I am presenting here an alternative...
  Can somebody help me? MT4  (13   1 2)
Hello I would like to know if someone could give me a hand .. I am not a programmer but sometimes I like to play with codes .. to the subject .. I have a script that its function is: when adding it to the graph it adds a fibonacci retracement but modified with risk reward .. I would like to know if
Hi, I have a problem to translate MQL indicators from MQL5 to MQL4. ( https://docs.mql4.com/constants/chartconstants/enum_timeframes ) For the example, I will use iMFI ( https://docs.mql4.com/indicators/imfi ) With a simple print, I can see that MQL5 timeframes are not loaded (M2, M20, H2) but MQL4
Hello Iam very new to coding and trying to make an ea. i need to get info about last open trade and also last closed like Open time .Close time . Type of trade etc and i have made this code it's not working is there a better way to get these info double lastOrderInfo( string N, int type) {
Hi there, Where can I get a Renko bars indicator for MT4? If anyone can help, it would be much appreciated REgards, Tania
Hello All . Please help . I am trying to do the following . but i cant figure out how ? I tried to use if else It does not give the wanted result. Any advice/fix please. 1.if I choose userinput value 2 then the value of shift should be cross_ago ( another user input value ) and then it should do the
Hi, does anybody know how to open a new trade and then modify all current trades to the same tp, currently my EA can modify the first few trades but after that it just says invalid or unknown ticket. int a; int b; int total; double c; double d; int cnt; double firstsellprice; double secondsellprice;
Hi all! Check out the grail: Is the EA suitable for real, and if not, what parameters would you like to correct? Test on Eurobucks over 10 years
Hello everyone! Sorry to cause trouble to the people here. I don't know the coding. I am here to let some helpful people help me with my EA exit conditions and Trailstop issues? I got the formatted setting EA and 3 trading hours and weekend trading codes from Google search. I managed to enter the
Hi guys is there a code that can OrderClose but if the trade loses 100 pips or any pips it will ignore the OrderClose and stoplose at 100 pips I hope I cleared my question I need examples (code) if possible. Thank You :)
Hello all. New here. I've been learning MQL and doing some basic coding in the IDE. The short TL;DR version of my question: Is the MetaQuotes/MetaTrader IDE the ONLY way to code and build MQL solutions? Or is there any other way to do this? ---- The long version, if you want more detail. Just
Hello every coders Good day to you all. I need some idea help. As we know trendline object create use only int value and bar count. I get problem when I try to draw a trendline from previous day high double value to 4hour high double value in 1hour timeframe. Please see picture. I want to draw like
Hi everyone! Its been a enough time while i have been developing EA's they all work great in real and demos but when i try to test or optimize them in tester they only take 1 trade in the whole time duration. Why it is so i found not solid issues or error in this regard. Kindly guide me if someone
I am using Octa-FX Meta Editor to generate my Expert Advisor but simple OrderSend is not sending new sending my new order plz check the code below. //+------------------------------------------------------------------+ //| HorizontalLine.mq4 | //|
I always tick the box "Save account information", but after every hard restart I have to reenter everything again. Additionally, MetaTrader in fact stopped understanding hostnames, so in each such occasion I have to enter server's numerical IP address too. Please let me know if I can have a backup
Tradingview has a trend-based fib time tool, anyone know of the equivalent EA for MT4? it's not available from the stand MT4 fib tools
I'd like to use GetTickCount(), but the documentation is so confusing. Please help. According to the GetTickCount() documentation, it returns the "number of milliseconds that elapsed since the system start". Does that mean since the start of the expert program, the trading terminal, or the operating...
I have 2 Mql5 IDs. Each ID has different EAs from the market. will EA still work even after logout from community under MT4 settings? 2nd question. Can I be banned by MQL5 due to using 2 IDs on one MT4? Thank you
Draw trenline by codes are not exact as manual trendline. It is difficult to get exact swing point ( Anchor point) as manual drawing. So most trendline Expert advisor are not success. In actually ,trendline breakout trading is better than other indicator trading system . Here I want to know is Can a
  StopLose and TakeProfit  (18   1 2)
//+------------------------------------------------------------------+ //| test01.mq4 | //| helmy gabriel | //| https://www.mql5.com |
Good day guys. I would like to ask - does anybody know if the ChartScreenShot command generates a chart event - or in any way affect chart objects? I have tried to use this to capture a chart which I open from an EA, the new chart opens with an indicator loaded to it that uses Canvas objects -
Greetings earthlings, how can I close a partial order such as 1/2 of m y total position after it reaches 1 ATR profit? once the below code triggers it keeps removing half of the position that is left. I was thinking of using my lotsize from the order but i have it as a function that returns the lot
Hi folks, I have very good EA wich works on back testing but does not work on live ac can you please have some thought ?