MQL4 and MetaTrader 4 - page 201

To post a new topic, please log in or register
  Oil SL (3)
Hi guys! I´m asking you for little help :) I´am newbie in MQL4 and have issue with my simply code for trading on Oil. It just open two position and i need SL always 10 cents for both position. Can anyone please advise me with this trivial issue? Or show example of code? I was spending a lot of time...
Hello guys, I wonder, how is quoted XAUUSD? What size is 1 lot of XAUUSD? It's 100,000 units in price? 
  Change chart line width (18   1 2)
Hello traders How would i change the width of chart line? There is setting for color in chart properties but I'd like to have the line thicker. Thanks
hi guy i  try tounderstund  how  use  Array  , i created a  simply  script  in this  script  i want  insert  a seconds  in  Array and  after print it  , but not  work :D  some one canhelp me ?? thankz...
Hello, Please, could you explain me how to decrease lot size of open orde in order to take a partial profit ? Regards. 
Hi, sorry to post this but I can't seem to figure out what is wrong with my code. I noticed that sometimes my ordersend isn't executed due to a timeout or "no connection" (amazon windows server) therefore i integrated this force open order function but it doesn't work. Please have a look, I...
hi, is it possible to set a level description in an indicator? if i edit a level in the indicator properties i can set level-value and description but i didnt found it in mql. thank you. mike
Hi, How to check number of trades taken on current hour for OP_BUY & OP_SELL. Including Closed order & open orders? I got this function code which checks orders are opened under certain time or not. But it doesn't counts how many.  int FoundRecentOpenedOrder(int TF) {   int last_order_idx =...
Hello, I have a MQL code that has a IsDemo logic that prevents the EA in working a live environment? I have tried to comment it out but it fails to recompile. I also need someone to assist me in understanding how the orders are being generated. Is it using a trend function or the last price or a...
Hello, I contracted to have an MT4 expert built to my exact specifications. I paid for said expert to be built and now the coder will not give me the original source code and has written a copyright on the EX4.  I mean it's my idea and I paid for him to do it isn't it my expert?  Can someone with...
i have a problem with normalizedouble in csv file : 226.82;-3.26;-9.890000000000001 226.64;-3.34;-10.13 226.7;-3.31;-10.05 226.79;-3.28;-9.94 226.72;-3.31;-10.03 226.44;-3.42;-10.15 226.78;-3.28;-9.539999999999999 227.45;-2.99;-9.109999999999999 227.29;-3.06;-9.220000000000001 WTF..... why sometime...
TimeCurrent() is a function to get the last known server time, and TimeGMT() give us the GMT time. The difference, expressed in hours, between the 2 values give us the server timezone (for example +2 or -5 referred to GMT time). My (simple) question is: is this value always the same or does it...
  editing mq4 file (13   1 2)
I know very little about coding. Can I edit a mq4 file in notepad and then save it and it will work on the chart? Thanks Randy
Hey ! I know that sleep command does not work in strategy tester.So i searched and try some ideas described by users,but none work for me.I want to make EA sleep if condition is true but when i try its alternatives at someconditions it does not sleep and some time it does not processed further. I...
Hi,  how can I create a panel with many single labels and always the same distance between. This should work without any changes on a normal pc-display or also on a 4k display. My problem is that I don't know how wide the single labels are. I can't say that a letter has a definite wide, so there is...
Here is the indicator code I'm trying to move inside an EA: extern int RSI_Period = 13;         //8-25extern int RSI_Price = 0;           //0-6extern int Volatility_Band = 34;    //20-40extern int RSI_Price_Line = 2;      extern int RSI_Price_Type = 0;      //0-3extern int Trade_Signal_Line = 7;...
  Tralling Stop (5)
Hello!!! I have a problem in the code. I tried everything, but nothing ERROR: 130. thanks for help.   //=========================POINT double MyPoint=Point; if(Digits==3 || Digits==5) MyPoint=Point*10;   for (int trade3=OrdersTotal()-1; trade3>=0;...
I have thought a lot of times that it is not optimal the way we have to get the output parameters of Custom Indicators in our EAs. I explain myself.  If you have an indicator with only one output -I mean output buffers-, then there's no problem at all, you can get the value of that output with one...
Hello, I am using the function res = WebRequest("POST",url,cookie,NULL,timeout,post,length,result,headers); to submit a web request via post. Is it possible to deactivate the URL decode within the given Text? I do have two problems right now: 1.) I am trying to submit a POST array wherein a Base64...
If I buy, say, 1000 units and then sell 100 and 200 units, is it possible to have my original position open with 700 units instead of having 3 open positions, one long for 1000 units and two short for 100 and 200 units?
Hey there I want to calculate the % out of the range of a candle. and on the basis of that I want my EA to place orders on the next candle. but it's not working. please tell me where i have done wrong.void openbuystop(){  char a=  (High[1]-Low[1])*0.04;   if (OrderSend(Symbol(),OP_BUYSTOP,lot...
asked here also : https://www.mql5.com/en/forum/86907 HI. I try it as below, can you please check this part of code; i have store data in "  write " part and they are true and i have the file .(have problem about time ) then i want to read them in " read " part and when i print them on chart have...
  OrderSend (3)
Hi, I'm new to MQL4 and I'm using bellow code to send a test order to via demo account. But unfortunately order isn't getting executed to the market. Is anyone possible to assist me with this?   //input int      StopLoss=10; //+------------------------------------------------------------------+ //|...
As you can see on the link my news indicator is not that helpful, as i cannot see a thing.  <link removed by moderator> I know i can move objects around, but if i then try saving it to my template, it goes back to normal if i open the template, or just restart MT4 - So is there any way i can modify...
I download history data from a broker. Can be the "universal" MetaQuotes Software Corp history data in the MT4 > Tools > History Center or data from a broker specific like for example FXCM. The data in the 1 min history are 1 line per minute. But when I put the Back Tester in visual mode, I see...
Hi all, i am very new with mql4. i am trying to make EA open trades depend on an indicator the indicator Code: <De-compiled code removed>  i try to take the indicator output to my EA with this code...
Dear Community. At first let me thank you for all those helping hands posts of other topics which made me learn a lot here.   Iam using following "simple" indicator in MT4 #property indicator_chart_window#property indicator_buffers 2#property indicator_color1 Blue#property indicator_color2...
Hi, we heard mt4 is now UTF8. So I have a file save as a utf-8 file from Notepad++. Its first line in Notepad++, in Windows' Editor and Word Pad begins with Sugar; ... BUT if I open it like this:    int nL,hdl  = FileOpen("Para.csv",FILE_READ|FILE_SHARE_READ|FILE_BIN|FILE_COMMON);   if (hdl ==...
Hello, please, is there anyone to help me, my error message is "array out of range". Here is my code : void OnTick()  {                for (int i=decalage;i<200;i++)                     {  if (iCustom(NULL,0,"ZigZag",12,5,3,0,i)!=0)                         {pics[j]=iCustom(NULL,0,"ZigZag",12,5,3,0...
Hi guys, I'm making a trade management tool. Here is the problem: 1 - I have only one selectable item - rectangle label that makes a background - you can see the little dot in top-left corner in picture 1. 2 - When i drag it around there are no signals sent to event handling function - only when...