MQL4 and MetaTrader 4 - page 690

Hi, I want to close when order runs with +20 pips i would like to close running order % of order partially with some profit. eg: lot size: 1 lot partial close parameter is = 50% so when order is running above 20+ profit pips i would like to close the order partially 50% of lot size. according to
Hello friends, I want to share with you my thoughts: I can see different way of using the RETURN operator:  I understand bool/double/int/string functions that returns a value. BUT why void function uses RETURN or RETURN(0)?  What it the diffidence?  Thanks. 
Here's a handy script I use all the time. It draws reference lines every 10 pips to help me gauge movement in the market. I was really frustrated trying to figure this out by looking at the prices on the right-hand side of the screen so I created a script. The script could be a good for beginners to
[Deleted]
Gan aku mau tanya kenapa ya aplikasi mt4 untuk lumia 520 tidak tersedia.....
MQL5.com web site is down for more than an hour - does anyone know why?
Question... Does anyone know if it is possible to "Lock" the size (specifically the height) of an indicator's separate window to prevent it from "scaling" when either maximizing the main chart window, or perhaps opening and closing the terminal window? I have created a simple indicator that is
Is there any specific reason why this happened, is it to do with some sort of update? It's a real pain because I'm constantly streaming my trades. 
Suppose I draw a trendline, and I want an indicator that can draw lines above and below it by x pips. So I first find the trendline, take its price and time values, and calculate slope, then plot the lines. However, certain instruments close early on fridays and open later on mondays, so even though...
Dears,  I have been using this indicator in the meta stock and I am satisfied of its results. Can any one help me find out how to program with MT4. Your help and support are highly appreciated.     The indicator mainly takes the DEMA (Double Exponential Moving Average) of 100 then filter it more...
[Deleted]
Hi Gentleman, I am confused when I change the direction of for recycle from {i=0;i<limit ;i++} to {i=limit;i>=0;i--} or {i=limit-1;i>=0;i--}in a indicator main loop, the result are not the same, while the last indicator show more late than the previous one. Here are the codes, The  previous one...
Hello,   I want to change the indicator for Renko candles only based on changes in PIPS and not on a time basis. That is to say, do not wait until the candlestick closing for the Renko candles are built but they are built gradually as the PIPS evolves without considering the candlesticks.   I do not...
Hi, I am creating an EA but I have a problem. I created two functions to close all opened positions Buy and Sell , but I do not understand why sometimes not all positions are closed by running this code: //------------------------------------------- //  this function close all Sell positions...
Dear mql4.com users: I want to know when an array position of a object pointer arrays han no pointer in int. MyObject *Objects[3] Imagine we have 4 objects inside this array And the we delete Objects[2], and made a loop trying to find the position without pointer. for(int i=0; i<4; i++)...
In TF-H4,How to write code for get first happen between high or low?
I need a script that allows me to put multiple sellstop or buystop from a price chosen by me and distance of 5 pips from each other without stoploss or take profit.
Wishing everyone well for the holiday season and new year. I have a question re testing my code in Strategy Tester.  My EA has positions that regularly remain open over several days.  Is it possible include swap prices in the testing of my EA?  Otherwise how can I know if my EA works despite swap...
[Deleted]
Hi everyone, I just suscribed a VPS yesterday, but I am struggling with installing a MT4 platform propperly.  I have tried to install it either in C:\Program Files (x86)\MetaTrader 4 or directly in C:\MetaTrader 4, but in both cases folder MQL4 with subfolders Experts, Indicators, etc is not there....
[Deleted]
Pretty much as it says in the subject line.  I found a supply and demand indicator online that draws rectangular supply and resistance boxes on the chart.  I want to use these levels as take profits and stop losses for trades opened in an EA.  How can I access these indicator levels in this EA?
[Deleted]
With the following code, I can place a dot at the bottom of a candle, for a specific value.  I would like to place a second dot below the first, for a second value.  Can anyone show me how to accomplish this?  I would also like to know how to add spacing between the first dot and the candle, so that...
[Deleted]
Hi guys, I am looking to implement a "hedge" strategy on an already existing EA. This EA works great when I set it to trade only in the direction of the trend. Identifying trends with a 200 EMA on a 4 hours chart. The problem is that occasionally during corrections of the trend the opened positions...
  Help with code?  (16   1 2)
Hello! I would like to write an EA which will set pending orders. I will set pending orders manualy. Let's say at 1.3000 BuyStop and 1.2950 SellLimit (curreny price is below). When/if pending orders are reached nothing happened. When pending order close at TP or SL, EA has to place same pending...
During EA testing, I find critical issue and later found the root cause is lotSize is high. Then checked the value returned from "MarketInfo( Symbol(), MODE_MARGINREQUIRED )" is '5' for EURSEK. I understand the margin/lot should be much higher than 5. How does the EA get 5?  May I ask a favor for...
[Deleted]
  data issue  (1)
hi i have indicator which gives me tick buy and sell signals. i would like to back test this indicator and i am not sure how to extract the back data  could any one of you assist gratefully figaro
[Deleted]
Does anyone know how you can choose the location on which you write in a CSV file? I only know how to write at the very beginning or end of a file. Plus only in the first column. I'm using this piece of code:   void WriteNewEntry(string Name, string Message ){   int handle=FileOpen( Name ,...
i test the WebRequest() function on some public domains,such as www.google.com www.mql5.com works very well.   but when i use it on LocalHost domians,it doesn't work anymore.   i did add localhost domain in the EA tab of option menn. 
Hello   Being completely new to the MetaTrader, Iam trying to understand what it takes to create an email alert based onstochastics/price divergence (divergence=price makes a Higher High, butStochastics makes a Lower High). The idea in a nutshell: indicator scans/monitors price data + stochastics...
Thanks for reading this. My goal is to have the code run in the background unaffected by me changing the time period (M1, M5 etc.). Right now, once the time period is changed, the code gets restarted from the top and my whole "Counter"-logic (see code below) doesn't work. Goal of the EA: check all...
Hi,  i was coding a History CSV Analyser for here offered Signals. I found following issue which might cause possible problem :  First screenshoot:   Explanation: Exit Date is earlier than Entry Date. I personally thing the Date should be next day (probably) but the stamp is from first day. See...
int total;    total  = OrdersTotal();     for(cnt = 0; cnt < total; cnt++)      {        OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);        if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) // Isn't it a less than, equal to sign?          {            if(OrderType() == OP_BUY)   // Why...
[Deleted]
Hi everyone, I was wondering why this array initialization won't compile. const int ORDERS = 10 ; int orderTicketArr[ORDERS]; the error is : invalid index value I would like to set 10 to a input variable but I can't even get it to work like this. any help would be much appreciated thanks