MQL4 and MetaTrader 4 - page 8

To post a new topic, please log in or register
Hello all, i am writing a "Master Candle" indicator (on H1). Master candles are highlighted, but now, i need to draw high and low trend lines until the price break these high or low. Then the trendline are stopped to be drawn on the (H1) candle breakout. How can i do that  please ? Here is my code :...
This trade incurred a loss of 1 pip on a 1 lot. The loss should therefore equal -10.00 (the spread) , however the loss appears as -7.56 in Account History. There are no commission, tax or swap charges on the trade, so how is it possible for the loss to equal this amount?  Order Time Type Size Symbol...
Hi all, I would be very gratefull if someone could help me by advising how to implement a snippet of code in order to let my ea have an interval of a certain period between opening positions. So I want it to never open more tahn one position at a given time. Let's say 20 seconds So now it operates...
Hello, So im trying to call iCustom on an indicator i found here :  https://www.mql5.com/en/code/19153 As you can see this indicator was adjusted from another to add some improvement including being able to call iCustom to have a signal when a divergence is spotted (4th buffer : Signal) But when i...
Dear Coders, I need your help. By "Specific" I mean Time Window. I would like to count BARS from 13:15 to 20:00 that are Higher and lower than the High/Low defined from 12:00 to 13:00 for every day. I tried this: double HH,LL,highest,lowest;for(int i=500; i>0; i--){if (TimeHour(iTime(NULL, 0, i)) ==...
Hello, I have a trade log exported from a signal from this website as a CSV file.  Do you know if there is a way to take CSV file download of trade history and import it into MT4 and make the historic trades show up on the charts? 
Hello, I tried to use new panel/controls interface in MetaTrader. I took SimplePanel.mq4+PanelDialog.mqh from Indicators\Examples directory, put them into one file SimplePanelEA.mq4, moved to Experts directory and I removed OnCalculate function and "#property indicator_*" lines. After attaching to a...
Hi Guys, How can i display the macd open and close level values on a chart. Could someone give me an example of code to enter into the ".mq4" to achieve this.. Rgards
please can you led me to an article or post about checking for inappropriate symbols when coding  indicator or EA  ??? thanks for help
Hi all, if I try to use the following code on a H1 chart  Print(iTime(NULL,NULL,1)-iTime(NULL,NULL,2) ); the result is 3600, 60 seconds x 60 minutes. If I apply the code on a Renko chart I seem the result is not correct. For instance the opening time for bar 1 and bar 2 is 11:44 and 11:35, the...
I have written a code and in this part i get this error, Semicolon expected. How should i write this line to avoid this error? extern int Chart.LeftTop.BarsL = 10;
According to the documentation on the ObjectCreate function (https://docs.mql4.com/objects/objectcreate), I should be able to pass a datetime value for the anchor point.  I have used multiple formats for the datetime value.  Regardless of the format of the datetime value, the object is always placed...
For the benefit of forum members I have attached a spread sheet that calculates how many lots you can trade for a given stop loss and a given %risk factor of your equity. Use the green squares to make your entries in the spread sheet. Here is an example: Let's say you want to trade the EUR/USD...
Hello, Is it possible run existing EA from a script/ea ? If so, is it possible to define the ea settings like Pair, Timeframe and parameters ? Thanks in advance, Manu
Good day all Does anyone have the english version of the attached indicator? If not, any of the helpful coders here can help change it to english please? Your help will be greatly appreciated! Thank you
I can draw a vertical line from past date into current date but how to draw a vertical line into future date? I've been tried with this code but nothing happen: extern int FutureBars=100;extern int BarsLimit=1000;for(int i=BarsLimit; i>=0; i--){    datetime...
How can I connect with Android? Mainly, I need to find the IP address to remotely connect to the VPS.  Thanks
  Previous Bar Trailing Stop (39   1 2 3 4)
Hi, has anyone a trailing stop EA which moves the stop to the previous bar's low/high? Thank you!!
Hi, I use metatrader4 on my Phone and tablet. Both android.  On the Phone all works ok, but on tablet samsung galaxy tab s2 i Have a problem with rotation. Program works only on horizontal position. All other apps on tablet works ok also on vertical position. Where is the problem? Anyone can help me...
Hello traders! I need help for my code. I need to get the current order price on the market, according to the ticket ... This price: I attach a function that returns the number of the ticket I found here: https://www.mql5.com/en/forum/109180 int LastOpenTicket___(int magic_number ){// Function...
Hello, I've been looking all over the forums and documentation and I cant find any information on my problem. I want to count the time in hours since a specific action was taken. I want it to be easily reset able and manipulable. Is there a particular "Count Time" function that I can use?  I am...
Hi, is there a snippet how to find the current used Symbol? I want to do that if for e.g Symbol = EURUSD than do something. If USDJPY do something. How can i handle that easy?
Hello. I have 4 MT4 on one VPS and all of a sudden I can't see anything in the market tab. I am logged in to mql5 and can see my Balance in the upper right, but the window is just blank. I can't see any Experts or Indicators. Not in any of my 4 MT4 installations. They used to work before, because I...
I got this function that selects the latest open  order .Now I want to determine whether this order is a buy or sell, how do i proceed from here? Will this work? if LastOpenTicket() == OP_BUY ) the Do this...... ) My question is , will the programme be able to tell if the last open  ticket is a buy...
This is my first post!!  In the MACD Sample EA included with MT4, what do the Open Level 3 & Close Level 2 actually mean?  I have only been practiceing for 3 months and would to try an EA.
  EA work on Renko chart ? (13   1 2)
I am just wondering if there are any special code for Renko chart? I mean the same icustom is used for Renko chart? double Buff1=iCustom(NULL,TimeScale,"Renko indi",1,1);//buy In renko chart, how about TImeScale? If EA attached on renko chart , TImeScale =?? Also what about icustom shift?  Shift...
Hello, I've tried for many hours to figure out what's going on with my code on this. From my understanding, I can code into a customer indicator in *.mq4 format to open my *.ex4 customer indicator. If this is incorrect, please correct me.  So now, here is the code I have been implementing using...
Hello, I am working on an index indicator based from this one : https://www.mql5.com/ru/code/9780 I really need to get the HIGH and LOW's values (from the subwindow) of each day then i will be able to draw boxes (with OBJ_RECTANGLE). I know how to get it from the price's chart to draw boxes on the...
  Code help (3)
//+---------------------------------------------------------------------------------------------------+//|                                                                            HLHB Trend-Catcher.mq4 |//|                                                                            Copyright 2016,...
Hello every one, I am working on a indicator based on this one : https://www.mql5.com/ru/code/9780 I am modifying it in histogram version by changing : "DRAW_LINE" with "DRAW_HISTOGRAM" . My problem is that my code, drawing all histogram bars in one color dependig on the current candle's color...