Download MetaTrader 5

MQL4 and MetaTrader 4 - page 876

To post a new topic, please log in or register
I'm trying to figure out how to make a (compact, low overhead, efficient) module that at a specified time, will set a Stop Loss Point relative to the Current Price for all open, active trades; set Trailing Stop Losses and then close the EA. I would prefer that it not be a Library file as their is...
Do not be surprised that thesame question is rased by keylove we are thesame. Assuming am using ema5 and 21. before place buy i will makesure that ema5>ema21on 1hour timeframe when new candle formed on 1hour then 1 will stead wait for newcandle to form on 5mins timeframe when ema5.ema21 before i...
please i want to enter trade base on this sstrategy in thesame EA and i do not know how to do it. when a new candle formed on 1hour, i wiil  wait till a new candle form on 5mins before i place a trade.Where am having problem  is i do not know how to code it in a single EA i can code the one of 1hou...
Hi all experts, This code does work but very erratically. Quite often when the conditions below are met i.e Ask >= buyprice, this block is entered but the ORDERSEND command does not process the order! I have checked it enters by looking at the new values of 'newcandle' which only change when it...
On the website of the Automated Trading Championship 2010, we've published the new article: The Complexity of Transition to MetaTrader 5. It describes the difficulties that developers of Expert Advisors may face during the transition to the new platform. Read the article to learn the effect of the...
Hi !! Sorry if the question is a little trivial. Is there a difference in the way these statements are executed/interpreted in mql4 or are they the same thing? if (shorttime==stable){if...
I don't know where to ask this question, but it's a general MT4 question rather than a MQL4 question. I can only open the EURUSD chart on my MT4 installation. Doing the chart+ button thing only shows EURUSD. Doing File->New Chart also only shows EURUSD. Ideas? I know the simple solutions (like...
New article Testing Performance of Moving Averages Calculation in MQL5 is published at mql5.com: A number of indicators have appeared since the time of first Moving Average indicator creation. Many of them use the similar smoothing methods, but the performances of different moving averages...
hello everybody well im kind a newbie in forex and also en metatrader. today i found something very odd i work in both the metatrader (4.226) y and the MQL4 fxcm station i left an oder to close in certain price n the chart, yesterday night well now i see that according to the mql4 station i made a...
For example, what I'd like to type is something like... if (marketposition == long) {} How do you do this? Anyone?
Hi, I would like to select in an EA the first order opened in the current symbol (not necessary opened with an EA) to collect some information (OrderOpenPrice, StopLoss...) but i have some difficulties to code it with the function orderselect. Does anyone know how to do it ? Thanks for your help....
Just wonder if anyone can help me on this code #property indicator_separate_windowdouble PosBuffer[];int init()  {   SetIndexBuffer(1,PosBuffer);  }int start()  {double sumn=0.0;sumn=PosBuffer[0];IndicatorShortName("FXST3CCI(" +sumn+ ")");                  } Does anyone know how and where PoshBuffer...
Dear all, I do not know if I can post indicator attachments, if not please my apologise. I need your help on developing an expert advisor that provide me an alert signal when the attached indicator changes it's color. The indicator is based on RSI and I have tried to do it but I was unable. If...
hi, i am working on a number of expert advisers and running them all in parallel on a demo account. at some times i have quite a few orders executed in parallel and it is rather difficult, without referring back to the logs all the time, to ascertain which EA initiated each of the orders. ideally i...
Hi All, This is my first post so please be kind. I've done a search of the forum and can't seem to find anyone else who has had the same problem. the issue is that my first program that I've ever written in MQL4 is that start() does not execute. (Code is Below) Could someone please take a look at...
RSI over MA with a ATR% stoploss I'm just interested in how much this EA would cast to be made. values i need to be able to change Lots RSIPeriod MA_Period AtrPeriod stoploss% of ATR takeprofis % of ATR how many orders at the same time the buy and sell order in is fairly straight forward when...
//+------------------------------------------------------------------+ //| STEP TRADER | //| Copyright © 2005, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ |...
  iClose bug (2)
I have found a bug on iClose function. If you ask for iClose(x,0,0) where x is another symbol different that the current symbol you will always get iOpen(x,0,0) value instead, EVEN if iTime(x,0,0) < iTime(NULL,0,0). I have only checked it on D1 time-frame with Open Prices model in backtester. Could...
New article Processing of trade events in Expert Advisor using the OnTrade() function is published at mql5.com: MQL5 gave a mass of innovations, including work with events of various types (timer events, trade events, custom events, etc.). Ability to handle events allows you to create completely new...
Hi, New to meta trader4, & all seems to be well except in my chart screen it says (error getting data to server) what does that mean? I shoul mention that i am running an expert advisor aswell. any help would be greatly appreciated. cheers, H
Anyone have a good formula to calculate lot size based on risk taking into account the stoploss?
extern bool Close all new trades=False; Is going in INPUT values and what is this broker mode and how is it write in code
I have this to calculate my lot size. Am I supposed to be multiplying it instead? double Lots = NormalizeDouble((AccountBalance()*0.00001)/(MarketInfo(Symbol(), MODE_TICKVALUE)), 2);
Hello. There are 2 things I want to request 1. I had my strategy done by an MQL programmer and turned it into an EA, would someone help me test it? I am new in Meta Trader 4 and EAs so any mentoring/coaching would really be apprecited. Just PM me. 2. I want to ask if my setting at the properties...
  Bar Question (2)
Is there a way to place an arrow at the previous bar before the current? This will place an arrow at the currnet bar; ObjectDelete("MdSymbolAi"); ObjectCreate("MdSymbolAi", OBJ_ARROW, 0, Time[0],vL); ObjectSet("MdSymbolAi", OBJPROP_ARROWCODE,...
dear community! the problem: i have an ea running, o.k. so far, suddenly the pc shut down and restarted, so the ea started also new, when the everything was online and running again. now my problem: i have opened orders and my ea does not recognise them anymore. in my ea i use the "SELECT BY TICKET"...
Hey all, first post...I have searched the forums and the documentation to try and figure out why this is not working. Here is my code: extern int TimeFrame1 = 1;extern int TimeFrame2 = 5;extern int TimeFrame3 = 15;extern int TimeFrame4 = 30;bool NewBarTF[4] = {false false false false};int...
//+------------------------------------------------------------------+ //| STEP TRADER.mq4 | //| LAS | //| |...
I haven't seen this before so is it something to do with the last upgrade? The EA runs in the back tester without errors but on forward testing it gives "invalid stop error" on every trade and yet I print out the stop and it comes out as 1.7265 for a short on GBPUSD so why is it invalid or is there...