MQL4 and MetaTrader 4 - page 591

To post a new topic, please log in or register
im new to this site and want to ask a few questions as there is nothing for beginners here. *can signals be seen on my trading platform? or are signals only seen on this site? *is there a way to automatically copy someone offering a signal without having to set up the trades myself? I appreciate any...
I am looking for a way to close ALL open orders rather than just the current code I have which closes just 1 order: void IfOrderExists86(){    bool exists = false;    for (int i=OrdersTotal()-1; i >= 0; i--)    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))    {        if (OrderType() == OP_SELL...
Hey guys, to be honest, i'm really disappointed of the latest MT4 software. I just can't belive that the mega bug with the trendline ( moving from timeframe to timeframe ) which had been discussed several times on almost every forum i know, is still there. I just don't get it. It's such a pain to...
Hi Anyone know if it is possible to remove an indicator programmatically from a chart. https://www.mql5.com/en/forum/115967 shows how to attach and indicator, script or ea void StartCustomIndicator(int hWnd, string IndicatorName, bool AutomaticallyAcceptDefaults = false){   int MessageNumber =...
Hi  i ve got the following code that scans the bars on a chart from right to left. What it does is to get the bar from the current TF i m looking at and get down to M1 timeframe and scan the bars there. Eg if were looking at the H1 timeframe then the loop will get each H1 bar and get down to M1...
Hi guys, i have to trades open with the same Symbol, Comment, Trading direction and i'm trying to close both but it only works once. The second trade is still open. Is there anything wrong? int closeTrade(string TD)  {   for(int i=0;i<OrdersTotal();i++)     {      if(OrderSelect(i,SELECT_BY_POS...
I want to setup an e-mail setting in my metatrade4. I have setted it up but could not receive an e-mail. When i contacted the customer support they told me that they only support outgoing messages with port 25. So i need if is there any one knows any generic e-mail that with port 25. Regards Shehab 
Hi  i ve got the following algorithm.  what i m trying to do is to check 1M TF from a higher TF.  while (i>=0)  // i is the standard IndicatorCounted()    {     log ("while i is :"+i);                    for (j=0;j<Period();j++)        {            candles_look=i*Period()+j ;...
Hi Coders, assuming I get hold of an object which happepns to be of type trendline and I want to iterte through its price values; as trendlines usually do, this one also leaves the screen area at some back time point. Naturally what comes to mind is - before I start the price values iteration I...
1)  I noticed that some automated trades are not initiated.  Is there a way to code the EA to try the trade again or do a market order getting the best possible price? 2)  Is there a way to code the EA to set a variable to the close of a certain time of day? Thanks!
HI All I have a major problem with charts freezing as I switch from one pair to another in the same profile. The new chart window opens and the old chart starts to build a minimized window but freezes and all other processes stop. I can open a second chart fine but when I go to switch  to...
I have to recognize , in this case, a long trade has been opened when a pending OP_BUYSTOP has been hit. It returns it to a variable nlongs.  If nlongs is >0 and the price has moved x pips, the stop loss is moved to break even. int GetLongsNumber(){   int n = 0;   for(int x = 0; x < OrdersTotal();...
Hi, I was running backtest on EURUSD and noticed that there is no data between 2012.1.13 thru 2012.12.04. So I went to history folder and deleted all downloaded files and then redownloaded all data for EURUSD from "History Center". Looking at the journal, I noticed that download stopped during Jan...
Hi all,  I want to get the OrderCommission() of an open order, for that have include extra code in the following block, Is this right and if so is it  value accessible in any part of code including void functions if I put double Commission; in Global ?  Thanks in advance for any help provided. Luis...
Seeking help; Live MT4 account stated in notional unit size (ie, instead of 1 lot, trades stated as 100K). However, when programming in strategy to backtest,  MT4 states "Lot Size." Thus, when backtesting, if I put in 1.0 in "Lot Size" (for 100K units) it is being read as 1.0 units instead of 100K...
Hi. I need help modifying an EA that I paid to have coded. It is a basic fractal breakout EA with trailing stop and breakeven, TP and SL. I want to modify it such that, once a fractal is used as a signal to open a trade, another trade will not be opened based on the same fractal. This is to prevent...
Hi guys, I'm just wondering if there's a way to do something like a fill-or-kill with two pending orders - so that if one couldn't be filled, the other wouldn't either? I suspect not. In that case, is there a way to bias the likelihood of two pending orders being filled in my favour? There is a buy...
I'm working on a new EA, and have created a flow chart to visually show how it will work, and it hit me.....what happens if for whatever reason, there is a communications failure between the client (my pc) and the server while the EA is running and there are existing orders already placed?  Here's...
Hello forum, I am not quite sure of the right wording for this question. I have made an indicator that draws arrows on my chart during the current (0) bar for certain conditions. This is what I want it to do. But I am wondering if it is possible to remove the arrows at the end of that bar. I only...
hi pl guide me i have fapturbo robot which time frame to select 1 min 5 min 15 min .what sl and tp in pips to be placed and lot size
Hello, I want to trade up (add to position) with a trailing gap after a certain amount of pips but only ONE trade up order as the trade up distance is reached. E.g. place buy order - first order at +50 pips trade up trailing with trailing gap - new trade up order (the EA currently places multiple...
Hey All, I have no programing experience, but recently started playing with Forex Generator 4 to create an EA. It is a fantastic program and I have pretty much included all the conditions of the manual strategy that I am trying to automate, except for the ZigZag. Is it posible to incorporate ZigZag...
Why do I often get OrderModify Error 3 (ERR_INVALID_TRADE_PARAMETERS) in such cases? 2013.02.11 01:39:53 - StopLevel = 0.00020000 2013.02.11 01:39:53 - FreezeLevel = 0.00000000 2013.02.11 01:39:53 - Error Modifying Sell Stop: 3 2013.02.11 01:39:53 - FROM: Entry = 1.33226 SL = 1.33684 TP = 1.32695 ->...
I've coded this little indicator to show me the last 10 trades profit or loss in pips. At the moment it shows me the first 10 trades in the order history pool. I want to display the last 10 trades. I can't work out why it won't work, can anyone help? Thanks.   double orderpipsprofit;color...
Hi all,   Is that possible to call a function from another function. What I mean is, if inside a void function I want to call another void function is this possible ?   thanks for any clue here Luis 
hello all .. I do not understand programming,,, help me,, this indicator who's willing to make an EA? .. is a good indicator in use TF M15, I would like this indicator into an EA,, thank <DECOMPILED (stolen) CODE REMOVED ! !> 
XXXXXXXX is a valuable indicator .It's a trend indicator and show the acceleration of the trend (Uptrend or downtrend) . How does it work ?
profitorig+=OrderProfit()-OrderCommission();gives 59.51 + 7.37 = 66.88 WRONGprofitorig+=(OrderProfit()-OrderCommission());gives 59.51 + 7.37 = 66.88 WRONGprofitorig+= MathAbs ( OrderProfit()-OrderCommission() );gives59.51 + 7.37 = 66.88 WRONGprofitorig+= (OrderProfit()-MathAbs...
I need some understanding on how some of you who run many ClientTerminals - all same expert and some/all using same account# deal with eg, daily draw down limit, maximum money risk, ... On single Client, one way to deal with each expert's 'slice of the money cake' if 2 or more on same...
Hello everyone, I have currently compiled an EA and have all the errors taken care of. When compiled I can use it on my chart via MT4 but I cannot send the file to another, and I do not have a exe. How do I create and exe. file from this mq4? I though compiling did it automatically. Thank you for...