MQL4 and MetaTrader 4 - page 196

  OrderClose error 4051  (12   1 2)
Hi, I have been trying out two EAs in S/Tester; one is a BUY oriented EA, the other is exactly the same but SELL oriented. The Buy oriented works fine fine but the Sell gives 'OrderClose error 4051' I've narrowed this down to the specific area of code but, apart from long/short trade difference
It would be nice if the objects were placed in the background chart in Android MetaTrader, Is this possible
I am new here, just got into the system and the windows where the charts are supposed to be say waiting for update. ANy help please
Good evening to all, I have a problem when I try to run my algorithm which should take a position as soon as the price reaches 10 points before launching the next trade but my algorithm does not take any position, do you know why? Here is the code: extern int priceinit = 0; extern int i = 0; void
Hi, I've got an indicator that plots a moving average channel, using the high and low values. I've attached a screenshot of it. On the actual chart, the channel is green if both upper and lower lines are going up, red if they are both going down, and grey otherwise. On that same screenshot, at the
Dear experienced traders, Do you know what is the default leverage when we test in MT4 strategy tester? How to set leverage such as 1:100 in MT4 strategy tester? * I'm a normal user only use strategy tester to test some product in the market, do not code myself. Thank you in advance and best wishes
Unlike expert advisor, where I can set an anchor point for object, while trying to write an indicator, I just can't find where I can set an anchor or at least get the object to a point above / under the candle. Thanks in advance :)
  MTF MACD  (1)
Hello, I am relatively new to MTF coding and I am having a challenge in making the MTF MACD display the signal line . I have managed display the MACD line, but the Signal Line is not showing due the wrong MTF reading. I will appreciate your help. Here is the complete code for the indicator I am
I got this awesome indicator and have been trying to convert it to EA but it's proving difficult. I will paste the source code here for anyone who can help me out. The indicator is self explanatory as it gives direction and SL and TP levels if anyone can convert it will be appreciated
Am subscribed to a MT4 signal and there are pending orders showing up on mql5.com signal page that are not showing in my MT4 account. TIA
Hello all, I have a custom indicator that used many indicator, Now I need to call my own indicator with different timeframe . It means I want recursive indicator with different timeframe, Is it possible mt4 indicator is recursive. Thank you in advance. Megha
Hi guys, After being filtered by Symbol, MagicN, Negative or positive Profit, is it possible to select the most recently closed order, I mean the last one closed among the others. Thanks for your help.
Hello, I'm using MT4 build 1330 from Oanda. I'm using this SQLite wrapper so I can work with a SQLite database: https://github.com/Shmuma/sqlite3-mt4-wrapper I slightly modified the example code just to see if I can understand the code a bit. Here's what I have currently: The working script file
Hi does any one else had problem with their MT4. Since 20 april my EA doesn´t work. I am not shure but I think it has something with the new build relese (1330) on april 19. My EA provider has helpt me with troubbleshooting and he can´t find anything wrong with the EA or VPS that I´m running. I´m
Hi, so as I wrote in the title, I coded an Indicator that gives me an alert when the last candle crossed the 21 Ema. I also check , if the alert was allready send on that candle by saving and then checking the value Time[0]. Now when I get an alert and change the timeframe on that chart, I get the
  enter code  (1)
hi 1- i need to enter some number in mt4 so that i need to get number or in c++ cin, how i write this code in meta editor ?? 2- in need to get free margin number and put it in int variable(like int A; A= get(free margin)) how i can do it?? what is a code
  Write to Json  (1)
Hi people, I would like to know if it is possible to write to a json file from metatrader4, thanks
I'm not understanding why the tester is stopping. It should go back to the beginning and start the checks again when all my statements end up being false right? I have done my best to comment everything and print statements to easily follow the path as its running. I have highlighted where it stops
<Deleted> Moderator's note: The forum is not the place for want ads. Use Freelance
Other people who I know can add Crypto to MT4 app and desktop. I go to add a symbol and I only get OILGAS - Indicies - US30 - Group CN. I do not see Cryptos in the list as someone showed on YouTube thank you for the help ***Dale***
//O double O() { return iOpen ( _Symbol , _Period , 0 ); } //H double H() { return iHigh ( _Symbol , _Period , 0 ); } //L double L() { return = iLow ( _Symbol , _Period , 0 ); } //C double C() { return iClose ( _Symbol , _Period , 0 ); } bool calcLong1() { O=O(); H=H(); L=L();
Hi! I run several EA's on my MT4-terminal and like an overview of performance on one screen. I've found an old "indicator" that gave me that, but now it needs updates and the creator is gone... Anyone seen something similar in the market
Please how true and reliable are back test results? Because i have made some number of EAs that has very great backtest result but on real account getting screwed up
Good evening, I am trying to run my program to write to an "up" file as soon as my indicators show me an increase, but when I run the strategy tester nothing happens, do you know how I can fix this problem please? Here is my program: extern int i = 0 ; void OnTick () { int ExternalFile= FileOpen
So I'm trying to read from a text file and after reading the information delete that line from the text file. The reading part I get but when I try to Write with one less in the array it appends the array insted of deleting the contend and then writing with this new array size. Do I need to FileOpen
  Spread protector  (3)
I am trying to code an EA to, each time an order is opened, it will change the SL to a "bigger loss" to avoid the spread. Ex. The SL is 0.7400 and the broker has a 10 points spread, so ne=the new SL should be 0.7390 or something like that. I am not getting a good result with the code bellow. How to
I am toying with some ideas for a future indicator and I am stumped at this problem: The indicator draws some lines across the screen as soon as it is loaded, as expected. Then I save the chart as a template. Then I load the template in another chart and the indicator is loaded, but it doesn't draw
Hi community, I am new here, starting to play around with MT4 and it looks great. I usually trade the forex market and sometimes the FTSE100 index. My question is about the index. I was wondering, since the FTSE100 is supposed to be a regulated index by Eurex, would it be possible to get some sort
Hi,I'm new to programing. I have problems using the Mathrand() function in the strategy tester. I hope to conduct a MONKEY TEST with the Mathrand() function, but it does not operate in a way I want. In a Monkey Test, I hope to create a series of random trade results, by Entering / Exiting each
Hello Guys I am facing difficulty to test and run a demo robot on MT4 and I need a solution. I was successful to rent virtual host for a month and also I see the EA name on experts under navigator BUT when it comes to strategy tester nothing happens. I don't know what went wrong?! I even watched and