Download MetaTrader 5

MQL4 and MetaTrader 4 - page 69

To post a new topic, please log in or register
How to only open trade/give signal in first x seconds of a new candle ?   I am currently creating an expert advisor, and I want them to only give a signal or open a trade if it is within the first 30 seconds of the current candle. How do I do that ?  My idea was this but not sure if this is correct...
Hi   This question was asked last year (https://www.mql5.com/en/forum/136611) but never answered.   I basically need to know the same: when using the startup config, I know how to write a simple Notepad file (see below) to make a specific chart start up each time MT4 is started regardless of last...
Hi I am new to the MQL5 community, I have been trading steadily for around 2 years now. I've decided to try out 'signals' I've set up a separate demo account, with 10,000 I've 'subscribed' to a signal, on MT4 which is set up on my remote desktop, for constant connection. However, it's been a few...
  RSI EA code help (12   1 2)
Hi...  Need an indicator to trade RSI. where if the value goes above 70 and retrace below 50 I enter short wher if the value goes below 30 and retraces above 50 i enter long  need help with teh code 
I'm having a little problem in learning to create custom indicators, EA's seem more easy, and i'm new to mql4  and programming, could anyone  help me to create this simple moving average indicator. I dont know what i'm missing, can anyone help me?...
I want to be able to see the actual value of a indicator such as the rsi with a horizontal line to the right of the chart to be seen with the actual number as oppose to at the top of each window.Can anyone help with that ?  
Hi guys.  I am trying to calculate CCI values applied on an Array of Heiken Ashi closing values.  I generate an Array with values taken from the Heiken Ashi closing values int CCI_Period=50; double HeikenClose[]; ArrayResize(HeikenClose,10+CCI_Period);   //develop the Heiken Values   for (int i=0;...
  Ideas on MM (1)
Hello, I am looking for some ideas for improving the Money Management part of my EA. Here is the printout of my tester results from 1/1/2009 to present with 1.4 spread. And the MM section. Maybe smoothing out the risk equity curve, or some sort of steps in risk equity. The idea is to reduce the...
Hello Members, I try to backtest an indicator on past selected days for example 22nd August 2001 for GBPUSD. I have GBPUSD full year of data for 2001. I imported it manually in history center. It loaded perfectly. Now the problem is when I back test it with an indicator on that selected date....
Hello,   I am using the indicator  "TMAcentered MACD v1.2.ex4 " and I want to include it into my EA. But right now I got a problem, how can I determine the current color of it programmatically ? regards, salexes 
indicator not working on my mt4 version 4.0 build 1045 (3 feb 2-17) updated.also one error.i,l be thankful if someone help me. on
Hello, I have so many trouble since I create new EAs. All previous code seems broken: I use to do this way to protect my EA: int acc=(int)AccountInfoInteger(ACCOUNT_LOGIN);    if(acc==0)return 0; // HERE I HAVE AN ERROR    //  if(AccountInfoInteger(ACCOUNT_LOGIN)...
Hi, I have only one single chart open. EURUSD M5.  When running the script below, it does open a Second chart (as planned)  - EURUSD  M15.  I would like the script to take a screenshot of the 2nd graph (M15), but instead it takes the snapshot of the 1st one (M5). Also, it does not close that...
I tried to synchronise experts and indicators with VPS on my MT4 platform, but the Droneox Guardian EA is being removed during migration. I tried to contact the author in the past with no luck. Any suggestons? 
Hi guys,    Please i need help to add a sound alert to this indicator. I did not code the indicator, i downloaded it from a different website.  I would like to add an alert that will sound whenever the arrow appears , either green arrow for buy signal or red arrow for sell signal. The indicator has...
Hi there, Sorry for the basic question but - is it possible to programmatically draw a trendlinebetween 2 points (ie. Close of 4AM bar and Close of 10AM bar)? Thanks in advance!
Anyone know how to develop a multicurrency indicator ? I want to choose BETWEEN 1 to 10 different currencies and 5 bars for each currency.   But i don't know how to do this.
Hello world ! I switched from NinjaTrader to MT recently and am trying to get the hang of MQL-code, so please be gentle. I am currently trying to add a 'Breakeven / Trailling' functionality to my EA. I copied code from  the (in?)famous UniversalMACrossEA.mq4 (http://www.forex-tsd...
Hello, I would like to calculate the daily profit of one of my EA, my code is: double DailyProfit() { double profit = 0; int i,hstTotal=OrdersHistoryTotal();   for(i=0;i<hstTotal;i++)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==TRUE)        {          if(TimeToStr(TimeCurrent()...
Hey People, i m testing a new strategy and there are always this errors ? 2017.02.06 19:04:54.903    2017.02.02 23:59:48  BO_EA_vortex_pme - 3 EURUSD,M1: OrderSend error 134 M1 Order send error: 138 can sb help me pls ?
Hello, How to use "\n" or "\r" into Comment() ?? instead of "  >|--|<  " to separate, I would like to go to the line down. Comment("|--|<  Daily Opened Price = ",Daily_Open_Comment,"  >|--|<  Marge_Pips = ",Pips_Marge_v1,"  >|--|<  Today_Profit = €",Today_Profit_USD_News,"  >|--|<  DrawDown = %"...
So this is odd. I have a function that is called before even OnInit() in my EA script. Of course this leads to problems...   Take a look. This is my initialize function: [...] double pips; double BottomLevelPrice; int LongTicketsStartLevel; int ShortTicketsStartLevel; int LongTickets[]; int...
  NormalizeDouble info (17   1 2)
Hello everyone, I'm trying to normalize the decimal places of the moving average, this code is correct or not? Even if I do not receive errors, I am not entirely sure of what is written! for(L=0; L< 50; L++){                          if(NormalizeDouble(iMA(NULL, PERIOD_CURRENT, 120, 0, MODE_SMA,...
I have written the function below to close my orders. I want to close only the orders for this symbol and magic number, and only either buy or sell. I've placed the order close within a loop that checks if orders are still open on this currency pair and continues to attempt the close until...
Hi, In previous version I use to do this way and it worked fine:       /// --- Prepare data --- ///                 if (Symbol()=="AUDJPY" || Symbol()=="CADJPY" || Symbol()=="CHFJPY" || Symbol()=="EURJPY" || Symbol()=="GBPJPY" || Symbol()=="USDJPY" || Symbol()=="NZDJPY" )                {double...
       int window = 0; double NewProfit; datetime CurrTime; ChartXYToTimePrice(0, 320, 410, window, CurrTime, NewProfit); Why am I getting zero values for CurrTime and NewProfit?
Hey guys, I have some problem to get the right signals.  I have already loaded the solar_wind indicator in the EA with iCustom, but the signals aren't really reliable. The indicator buy/sell signal aren't synchronous with the indicators alerts (alerts happens when cross is happening).  Now I noticed...
What formula can I use to assign EQUAL distance between ask and profit level accross instruments when going bullish? I realize that instruments with higher spread give shorter distance on the chart, and vice versa. I have tried the following but the distances still vary.extern ProfitLevel = 200;...
On MT4 build 1045 I try make optimization my strategy. Optimization made some passes, but only one (first) includes trades. Because of my strategy is not simple, For surveythis problem I made very simple strategy. It only make order send in initsection and on first tick. But this have this problem...
  MT4 EA Candles History (14   1 2)
Hello,  I have an EA that needs to get all M1 bars currentyl in the server for a symbol. How can I achieve that?   Thanks