MQL4 and MetaTrader 4 - page 31

i am getting a Sell/buy Failed with Error #4051 Invalid lots amount for OrderSend function . i am still very new to coding and i am trying to fix these errors, but the ea places the buy&sell trades just fine. so i dont know what is wrong with the Ordersend line. could someone please give me some
Hello! How to write the code to detect the floor and ceiling in the market
Hello all, I just downloaded MT4 on my PC running Windows 10 - Version 10.0.16299 - Build 16299.  I'm trying the basic task of adding expert indicators, which requires that I go to File > Open Data Folder. However, when doing so, I get an error stating "This App Can't Run on Your PC" with a...
[Deleted]
I was wondering what the change in the buffers is when you scroll back and load older data. I am guessing the pre existing indexes are unchanged and the new data is added to the back. However what is the maximum size the buffer can get? Is an event created? Does the event cause the start() function...
Hi everyone, Ex: I have 2 order limit ( Buy Limit GOLD 1920 and Sell Limit 1925 ) When the price goes down to match the buy order, is there any way to check if it has matched the order to get information (opening direction) and delete the remaining sell limit order? Thank you
  Need an older version of mt4  (23   1 2 3)
Hey, the new 1045 build has issues.....does anyone have build 1030 or one lower for upload?
This topic has been discussed here many times, but I still haven't found a solution: On a Windows10 PC and a Windows 2022 VPS, I have not been able to log into MQL5 with MT4 for a week now.: Logging in works on MT5. The MQL5 website is also not displayed correctly on these two PCs.: On another
Since VPS does not accept global variables, do they accept files or not? I need a variable that will be retained even when I shut down MT4/5 and not just a variable that will be remembered within function calls. And I think file processing can handle this efficiently. Also my EA is meant to be
I need to draw a circle object after a text label, how can i do ? Could you please give me an example
Have anybody experienced difficulties when trying to login to MQL community via MetaTrader and if so did anyone manage to solve that problem? I use MetaTrader4 and i cannot login to MQL. It tells me that either my login or my password is incorrect. I can login via any web browser with no problem
Hi please after last update everytime i fail to install mt4 or mt5 upon clicking the exe file it always gives me this blue screen error: this app can't run on your pc error !!!???? I have tried three different pc with three different windows operating systems 8, 10, 11 with no success so now i cant
[Deleted]
Hello to all professors I want a distance of 10 pips on the last position That is, when the last position is taken, if it goes to profit, no new position will be opened for another 10 pips And if the last position goes to the loss, the new position will not open in the same way for another 10 pips
Hello guys, may I ask you a little question: Is it possible to send a webrequest to a specific port? (MQL4) And how can I set up metatrader 4 to communicate with a localhost? Is it possible to send a request to a "http://localhost:10000/" ? WebRequest returns ERR_WEBREQUEST_INVALID_ADDRESS and I'm...
  Trend Quality indicator(s)  (139   1 2 3 4 5 ... 13 14)
These indicators are all based on a 2004 April issue of Technical Analysis of Stocks & Commodities article by David Sepiashvili. Originally there were only 2 versions developed by the author, but there were some possibilities that were not explored in that article which lead to developing some more...
[Deleted]
Hello, I've tried without success to let the user choose wether the indicator will spawn on a separate chart window or on the chart window. Someone has any idea on how to achieve it
hi my code work correctly in live market but in backtest it opens too much positions at the same time what is the problem
Hi, I was hoping someone could show me how to achieve this in code thanks
  python script  (1)
There's a newly added feature in the mql4 wizard which is python script. How do I add the python script to an mql4 expert advisor? I am only aware that it is possible to add include files into the expert advisor
  Pending Order EA  (2)
Hello Everyone, Please I am trying to create a bot that takes a buy stop and sell stop order simultaneously at a a particular time but it seems there's a trade order error. Code attach below
hi all, I am closing all open charts and then opening a defined set of charts afterwards. void OnStart () { long nextChart = ChartNext ( ChartID ()); //closes all open charts while (nextChart > 0 || ChartFirst () != ChartID ()) { nextChart = ChartNext ( ChartID ()); if (nextChart > 0 )
Hello! So, how would one change the default data folder for the MT4 platform to a shared folder? I have a VM which I run the MT4 Terminal on, but I do want to share files between my VM and my local computer without having to copy files over from the default data folder to my shared folder which is
I tried to lock the bid price but it did not work if(price>0 && Ask<=price-70pips) { OrderSend(Symbol(),OP_BUY,0.01,Ask,slippage,sl, tp,"",Magic,0,Blue);} I dont want the condition to execute first..i want it to capture the price first and when the price is below 70 pips then it trigger the
I have fiddled about looking for design concepts to implement visuals of the data collection, aggregation, et al (pics below). As much as I love the MT4/5 platform, visuals are not its strong point. First, real estate is expensive; Second, I/O overhead on graphics rendering is high - the more
  Login failed  (1)
I Have meta trader 4 and i cant login into me MQL5 ACC from me VPS Chocoping . When i Login from PC its working. Anyone have problem like this
hello friends I have a bot that runs on several currency pairs I want to save the profit amount of each currency pair in one line of a file For example: EURUSD 19.30 USDCAD 8.03 AUDCHF 13.37 whenever the profit amount changes, I want to find the previous line, correct its value, or delete it, and
I have [written] a quite simple currency strength indicator (for CAD), it just uses the average of the close price of all seven CAD crosses. Then, since that line is quite jagged, I added a moving average to smooth it out. When I call it from an EA with iCustom, it get 'similar' values, but not the
Hi all, Ive have some purchased EAs in MT4 and would like to know whether there is a possibility to customize the backtest report to add a couple extra performance indicators. I'd like to add maximum equity drawdown and recovery factor. Is this possible, I have no programming knowledge. Thanks
Recently, I've developed several trading strategies and found that creating a profitable one is quite challenging. One of the strategies involves numerous conditions, but I've noticed that these conditions affect the trading volume. However, relaxing these conditions results in losses instead. Below
Hi, I'm relatively new to MQL4 and my apologies I cannot find any examples of this or understand how to do it myself. If I have an Order at a specified OrderTakeProfit and OrderOpenPrice, how do I compute the expected Profit if it closes at the price (assuming the current Swap and Commission, the
  access violation  (3)
Hi, Can anyone help me please. I always get this error message when running the strategy tester, what's the reason for that