MQL4 and MetaTrader 4 - page 447

  modify ea code  (3)
hi all, I found an helpful free Expert which closes orders after a set time, unfortunately it delete too pending orders! I would like it to close only the opened trade. Someone know how to solve this problem changing the code? thanks
Hi, I am working on a trading systems based on MAs and Sup/Res levels. The idea is if án MA and SUP/RES are very close to each other and price touches that level and bounces back to open an order. One could code that like this: if(low < MA && low < RES level && close > MA && close > RES level)...
Hello everybody, Sorry but i m newbie... I would like to create a simple EA based indicator Dtosc: BUY cross <30 SELL cross >70 I start with indicator but I can't turn it into an EA. Please, can someone kindly show me what are the first steps? This is wrong: if (SD > SK ) {...
At the very first I know that this thread is about MQL5 and I've attached MQL4 code but I think this problem is the same in MQL4 or MQL5 (maybe I'm wrong). EDIT: I've tried in MQL5 and this problem doesn't exist in MQL5 I create (by code) several objects on the chart and the first one is clearly...
Hi, Since I use Android 8 I face some serious problems with the Metatrader4 app. Every time I switch from a randon tab to the 2nd tab (graph) the app quits and I need to restart. I'm using the latest version version of the app (400.1102) and Android 8 on a new Huawei P Smart. I tried already to...
Hello guys, I'm a bit stumped here. I have developed an EA to trade Bollinger Bands. Any of you who have seen my previous topics know I'm new to coding, but I feel like I'm making progress. The issue I'm having is that when running an optimization on this EA, I get a "Zero Divide" error. This error...
Hi, When debugging EA's, you have the handy-dandy Expert tab to send Print() output to. Is there an equivalent way to easily output values when debugging indicators? Cheers and thanks.
I cannot seem to find an option on how to change the time. The candles are 2 hours in advance. When I installed MT4 I was in a different country that was 2 hours ahead. Is there an option to change the time, I wouldnt want to reinstall MT4
I planned an EA trading with grid.i explained grid like this: bool buypoints(){double m[201];for(int k=0;k<=200;k++){m[k]=NormalizeDouble(((uppervalue*1000-steppips*(k+1))/1000),Digits());//uppervalue and steppips are external values for usd/jpy.if(m[k]==Ask) return(1);}} if (buypoints()&&some...
Is it possible to apply custom indicators to mobile metatrader? Is there anyway at all to import custom indicator into MetaTrader 4 Mobile? As far as I know you can't, but I was wondering if there have been any updates or custom updates that allow custom indi? If can, How can I load custom...
I use current month+ current day+account number as a seed for MathSrand() to generate a pseudo-random magic number each day. I would want to be able to look at trade history and create a report of all trades that hit SL (for example), so I would want to get a new seed for each day in history to be...
Is there a method to capture an objects name from the cursor position? All i seen to be able to capture is the price and time I was thinking something along the lines of placing the cursor at Time1 and Price1 and then iterating through all the chart objects until I find a match for Time1 and Price1...
Hi i`m trying to build a trailing stop, and it's working fine but sometimes i get a nasty order modify error 1.I don't know if it's harmful i've read the documentation it is when the value is unchanged i guess,but the question is how to resolve it :D .Hew is my code: double TRAILSTOP;extern int...
  Excel bridge  (4)
Is anyone aware of a MT4 script which would read from and write to Excel?   I know that there's one product easily found with googling.   But the reviews aren't that great.  I can get python or other code written for this but I assume someone else already has the pieces. Thanks
Hello all! :) I need loop for this, it is strong to me... I want to find the range for the last two bars and search for 5 bars And get the result in print, please check picture for understanding. better to explain I do not know, so I believe it will be understandable from picture. I need this...
[Deleted]
Can somebody tell me how to turn that annoying sound off?????? I've disable all 'alert' but that disgustingly annoying sound keeps beeping every 2 to 3 seconds. Help!!!
Hi, not sure if this exist, but am after a RSI level alert indicator (currently using this indicator) but am looking for one where the alert can trail the actual position. In example, if RSI hits 50 as an example I set me alerts 15 and 85, but if RSI moves to 60 then I want my alerts to change based...
Hello mates I am new at MT4 I made some orders on MT4 but now I can't close my orders. Please help me. I want to know how to close an order on MT4. thank you. Asad Jamal
Hi, Firstly I would like to emphasize being aware that possible solutions are hiring a developer in Freelancer section of your forum or looking at Marketplace of available custom tools. I already reviewed everything in Marketplace, however needed giant tool is not there. Would like to enquire about...
I'm looking for a very good web host who offers MT4 hosting on a VPS any suggestions?   
Hi, I am curious to find out: Those indicators / EAs that display text and lines which are not clickable or draggable, not the standard MT4 text labels that you can right click for properties or drag them around, how do they code those?  Thanks!
I want the code to ensure all trades are closed.  Will this while loop function?  Do I run the risk of becoming stuck? bool result=false;   while(!result && !IsStopped())   {      result=true;      for(int cnt=OrdersTotal()-1; cnt>=0; cnt--)      {         if(!OrderSelect(cnt,SELECT_BY_POS))...
Hello, I just coded an EA and I'd like to add a Trailing SL to it but I'm not sure if MQL4 includes a function for that.
  Help with my EA.  (33   1 2 3 4)
I just ended up a MQL4 course and started to mess around with Meta Editor, just a simple MA crossover EA, but I'm having a few problems: 1- I want the EA to open a trade on the next crossover, not on the current one. 2- I can't get the EA to close the first order and then open another one. The...
hi, i want to access next values inside a loop. As an example i = 100, 90, 80, 70, 60, 50, 40 for(int j=i; j>=i; --j)            {} inside this for loop i want to use, get 100 and 90, get 100 and 80, get 100 and 70, get 100 and 60, get 100 and 50, get 100 and 40 etc.... Next i want to use it like...
//+------------------------------------------------------------------+datetime send_ha_order_bartime;//+------------------------------------------------------------------+void send_ha_order(ENUM_TIMEFRAMES ha_TF, double lots,int magic)  //{int stop_level=(int)SymbolInfoInteger(_Symbol...
  Trend look back  (4)
Hello everyone, I just started this code today, but I'm having some problems understanding the error message. "could be one of 3 function(s)"  isn't particularly helpful.  Some ideas please. void Draw_Trendline()  {   datetime StartDate=TimeLocal();   datetime FinishDate=TimeLocal();   PriceClose =...
Hi! I would like to create an indicator which can show two line of two different currency pair in the same time. I've created the two timeseries, adjusted them togehter, but the indicator show only one of them. What can be the problem? #property copyright "Copyright 2017, Roland Szarka."#property...
  Volume  (4)
What is this volume here?
Hi friends, Is there any indicator in the market which is free... that shows a Bar close at how many % of the whole body?  When my mouse point at that bar, it will review at the right top side of the Chart. Very small with number percentage showing in colour Setting. Red = Bear  Example 40% Green =...