MQL4 and MetaTrader 4 - page 451

if(OrdersTotalMagicbuy(Magicbuy)>=1){ObjectCreate("HLine", OBJ_HLINE,0,Time[0],OrderOpenPrice()-50*Point);}if(OrdersTotalMagicbuy(Magicbuy)>=2){ObjectSet ("HLine", OBJ_HLINE,High[0]-50*Point);} Hi, I'd like to create a trailingstop function, I've created these lines of code that work, only if the...
Dear Programmers, I would like to ask your help about sending an e-mail. I went to the e-mail settings (MetaTrader-->Tools-->Options-->Email) and filled out the datas: SMTP server: mail.t-online.hu:25 SMTP login: login_name SMTP password: login_password When I push the Test button, I get the...
Hello Traders, I am new to mt4. my mt4 software doesn't show me the commission or swap for the live trades. every time I open a trade I have to go to account history to check my commission. check the picture below. please help me with this issue. Thank You. happy trading
Hi, My custom RSI indicator with divergency freeze, and I don't know why. It freezes when you change timeframe or when you change profiles... Please find the file attached.
hello everybody I need a code which close all buy orders and then close the remain of the close buy s.... Can anyone help me?
Hi everyone, I know most traders have mode than just one monitor to trade, in my case i have 3 monitors to a laptop, this way i can see clearly multiple time frames (15,H1,H4) The thing is, if i get an alert on any of the terminals (example: EURUSD H1) it would be great to go to that chart and when
[Help] My force index formula didn't match MQL Force Index Indicator line I tried to experimented many indicators formula but when I created force index without using iForce function the indicator line is not same as the original MQL Force Index indicator.    int limit;   int...
[Deleted]
Dear Friends, can someone help me to create an EA based on Lindecourt Custom Indicator. I just want the EA to open buy/sell position as soon as the indicator dispays the Arrows (Green/Red) on the chart. I mean I want the EA to simultaneously open positions as soon as the Alert and Arrows apear....
I'd like to make option levels indicator for MT4. My Russian version of topic is at https://www.mql5.com/ru/forum/224805 Here it is my idea. According to one theory (Ildar Nurgaliev, Russian  https://www.youtube.com/channel/UClZo081odiV1tVTnXPLY13w?app=desktop) price moves from volume to volume. The...
Hey all, I use my EA to draw a line called "Trigger" on the chart upon the first tick which I then move to a support/resistance area i want to wait for a signal from to take a trade, I have then also programmed it to delete this line when the EA takes a trade to avoid opening multiple trades for the...
Can a broker disable expert advisors? Does IsExpertEnabled() check whether the broker has enabled or disabled expert advisors? Or does it only check whether the user has enabled it in the terminal? Similarly, does IsTradeAllowed() check whether the broker has enabled or disabled trading in the...
Backtesting a Renko EA on MT4 Is it possible? If yes how? Please Help :(
Hi Folks, I've been working on this EA. the idea is to follow the trend and enter at pull backs. The problem is when the trend stalls and reverse, we don't know whether it's for real or just another pull back. So I programed the EA to enter an opposite trade with larger position with the hope that...
Please kindly explain Is the back test spread in pips or point? For instance if the spread is 0.5 pips. What value should I input in the Backtest? Is it 5 or 50? Thank you
Hello All. I'm trying to source a Bollinger Band indicator that simply allows me to fill the space between BBtop and BBbottom with one user defined color. Can anyone point me to such an indicator?
Hi ,   I have some ea that opens  a csv after dowloading with a second ea . With the  tags  FILE_CSV | FILE_ANSI | FILE_READ   ,  the txt string that is with Print () is not in english ,   an example of the csv :  eurusd   1.1216  gpbjpy   146.79 audjpy   0.8951 with  the string displays , it gets...
I'd like to identify a trend line when clicked. The chart would then display additional info & lines related to it, so that the chart isn't too clustered in the normal state. I know how to do the rest, but Is there a way to get the object's name or any info when it is selected? Thank you for the...
Hello!Is there any symbols who ticking at Saturdays and Sundays? You already know, need to try EA, but the store is closed. And nothing happens, nothing happens at all. Thank you!
Hi all, I have a script that changes the template on ALL open charts.  It has an input parameter to determine which template [0,1,2,etc].  Is there some code I could add to this which applies different templates to different markets? For example: if(market=GBP/USD) { apply template 1 }...
Hello Hi Everyone,I Just Started Using Mobile MetaTrader 4 Platform To trade Forex Online. So i would Like To Tell You That I can Only enter Into The Market Using Only Market Execution Price Means I can Sell Or Buy Only At The Current Market Price. But What If I have To put Buy stop for future...
Hi guys, please help. i am getting OrderSend Error 138 on strategy tester, what can be the reason, and how can i fix this. I do call the Refreshrates() function before any Ordersend() and i have a wide enough slippage of about 100 pips, but still get error 138 when testing, what can possibly be...
I think EA stops control just after getting an error, If it's the case please tell me how to let the control passes in advance after the last error regardless what the error is.       {            while (TicketSell2 == -1)      Sleep(100);      RefreshRates();      TicketSell2 = OrderSend(Symbol(),...
  Advise on MQL4 vs MQL5  (20   1 2)
Hi all I've read the new here: https://forum.mql4.com/59622 Question is: Quit a while ago I started learning MQL4 to about an intermediate noob level. Now that time as gone by I wondered should I continue to write code in MQL4 or just start learning over again and go right to MQL5 Are most forex...
Well, the question is, when i have EA and set to trade only trade at the time and then have another script running in other pair or whatever with the same thing, just one trade at a time (done by OrderSelect MODE_HISTORY) doest that mean that when the first EA is in a trade, the second wont trade...
why sometime delay 2 or 3 minutes to pop up alert message? Code at below, which line of code causing the pop up alert message delay?  #property copyright "Copyright 2017, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strict#property...
My EA connects to a mysql database.   But when I run strategy tester, I see a huge number of error messages stating "errorn 1040 too many connections" Since I control the db I took a look at it to see if I could detect the prob.  There were 65 connections which is way too high.   I rebooted the db,...
#property indicator_separate_window #property  indicator_buffers 1 #property  indicator_color1  Silver //--- input_1 parameters extern bool      Export=false; //--- buffers double ExtMapBuffer1[]; int iHandle = -1; int iErrorCode; // begin Encog main config                         string...
Dear all I have this issue -I open the platforms Mt-4 -I open the charts -I attach the EA's to the charts (autotrading activated) -I close the platforms Mt-4 -I open again the platforms Mt-4 -The platforms loads the charts but DON'T ATTACH ANY EA to the charts Could you suggest me something to check
Hi all. I'm making a custom indicator in MT4 and MT5 using the SymbolIsSynchronized(). The indicator uses the data of multiple Indexes. But this function does not work with MT4. Is there a substitute MT4 variant for this function?
Hi Guys, I'm testing my EA and I'm getting always the error 138 each time I run OrderSend function. I edited the EA in order to just call OrderSend on each onTick event: RefreshRates();       int test=OrderSend(_CROSS,OP_BUY,0.01,Ask,5,0,0,"",0,0,clrGreen);    return; In the code I only declare...