MQL4 and MetaTrader 4 - page 245

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
Hello everyone, I need a help about coding. Actually, I am learning about coding and decided to make an expert advisor, but along the way I got stuck because it doesn't work well in MT4. I want to make an EA with following specifications: - To Buy or Sell when MA crosses. - When the opened Buy order
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 ?
Hi, Everyone, I'm getting error whenever I'm starting Strategy Tester. The problem is that Trailing stop works on Buy signals but it does not work on Sell signals. When I place TP and SL in sell OrderSend code everything is fine and automated system works. But I want to activate Trailing stop on it
Hello, i work on a built 1280 MT4 version. I am searching for a period converter indicator to transform the conventional timeframe on the MT4 plat (ex. 1 min, 5 min, 15 min, 30 min, 1 hour, 4 hour etc.) to unconventional timeframe (example 2, 3, 5 hour etc.). I found on web several versions of this
I tried run a walk forward optimization test last week, can we trust it ? Window size : year Forward size :1 month Test period : 2011-oct to 2020-sep symbol: US30
Hi, I'm very new with MQL4 coding. I have an issue with my EA. Im not sure what is the problem. When running backtest, everything is good. But when running demo/real, a lot of unwanted Order open. Im suspect something to do with the TimeCurrent() as I use it to differentiate between current and
Hi Everyone, I've written a short code to measure the minimum duration between two ticks during a backtest (MQL4). I get one value =0ms: what could be the reason? It happens on Dow Jones (US30 Fxcm on 12th November around 11:34). Thanks a lot in advance :-) Here's my code: uint g_ttick_ms_prev
Respected Sir/Madam, I want the 2 line MACD to be the Indicator for Meta Trader 4/5. When I compile the Meta Trader it gives Errors. How can I compile a MACD 2 line indicator which is attached? What is the method to use the Attached Indicator
hello all How to programmatically put and show an indicator on a chart.
Hi all, i was writing in the MT4 Editor but suddenly the keboard doesn't work. If I try to write in Notepad or other software there are no problem. Have I a pushed a strange keys combination
Hello all guys. I was wondering if there is any change to develop an algorithm to detect support and resistance. I wanted to try to make one to use for a future development of an expert advisor. May I ask you to contribute to this post and add your code or articles or concepts as basic line ? The...
How to check if last three orders were in loss (any buy or sell order) in order history for the current symbol? and if last three orders are in loss, the variable "last_3_orders" should be set to "1" else set to "0".  (Mql4 code) int last_3_orders = 0;string last;for(int i=OrdersHistoryTotal()-1...
Hello, sorry I am brand new to MQL4 and am running into some errors. I am coding a simple Bollinger Band strategy that will go back and forth in buy and sell positions. I think my problem is in how I am telling it to open buy and sell orders. My Code: int length = 11 ; int mult = 2 ; int OnInit ()
Hello, New here. Im struggling to find a tutorial for creating a custom indicator or table. Basically I would just like to create a table on a separate window various currency pairs going down and timeframe across and just flashes every time say the 6MA crosses another 18MA. Nothing fancy no graphs