MQL4 and MetaTrader 4 - page 523

int Check_OrderIgnore() {    //If the previous order was a stop loss and  was buy order    //Set the buyIgnore flag to true    // Else if previous order was a sell and was a stoploss    //Set the sellIgnore flag to tue    //----------------------------------------------------------      if...
Dear, I want to create a function to return pips value base on my volume and profit in currency. I already create a function but not working. int PointFromAmount(double LotSize2, double RecoveryLoss) {     double UnitCost = MarketInfo(Symbol(), MODE_TICKVALUE);     double TickSize =...
I wrote this code with two function. As soon as I have an cross of moving averages between two candles, step to the next step where I have a for loop, which identifies a Heiken candles pattern. the signal is correct, but if I have an cross of moving averages between two candles, without the pattern...
How to conditionally save information using Array? Hi everyone, I am currently experimenting conditional Arrays and came across a problem which I need some help solving it.  How do I store data(information) every time a condition has been met?   Any help will be much appreciated.  Thanks in advance...
Hi everybody, I come to you because I need a clarification. So I programmed an Expert advisor, he uses the ATR as SL. What I would like to be able to do is tell my expert advisor not to take into account the SL of the ATR if it is more than 200 pips for example. If the ATR wants to place an SL at
Hey,    Just new to this forum and would need some help with 2 things   I'm using a iMA function to get the MA value but don't really understand one part of it which is pretty essential.  1) The lastBarShift, as I understood it, this excludes the candle being formed right now and instead looks at...
Hello! I wrote a EA with dll ( c++ )  I used unordered_map collection in dll and it works fine when i used windows console app but when i used dll in MT4 with EA then MT4 crash :-/ I would like to use hashmap collection in mql4. I tried hash.mqh but it did not work well therefore i used...
if (Minute()==0) { } vs. if (TimeMinute(TimeCurrent())==0) { }  
Hi - as per my other posts I'm sure this has already been talked about, but I can't find it :) Is it possible to set up an indicator so that it shows you a higher time frame but to the scale of a short time frame? That might not make much sense - so here's are some pics to show what I mean. The...
Hi coders, I always receive an error #130 when I place two pending CFD orders. Placing two forex orders is no problem. But when I want to trade oil, gold, dax, s&p (anything where MODE_PROFITCALCMODE = 1) only one order is sent and for the second order I receive error #130. But WHY?? I don't change...
After installing new mt4 it does not display my uploaded profiles. Please help me out guys. I spent whole weekend to abslyse my charts.  Thanks a lot for any advise.
As promised, on Monday 14.09.2009 I opened a 10K account, or rather I added money to one of my trading accounts up to 10. :) I will try to surpass the result of one of my students in real time. He started on 08.06.09 with 10K, now his trading account has a profit of $180,462.10 Apart from Elliott
  MT4  (3)
recently I can install MT4 anymore from http://www.metaquotes.net/ even I already dwnld metatrader 4 but the result always get the metatrader 5 How I can fix this problem? Thanks 
I am new to MQL I am trying to calculate average low for a given timeframe, I know how to do it in TradeScript but not sure about MQL. TradeScript: (Ref(Low,14)) - would give the 14 day average low
Hello, I would like to build an EA that enter a sell position when the RSI is over 80 and then the MACD Instagram crosses below O. I have trouble to do 2 things ( I am not an expert at all!): 1) I don't know how to write a series of event (i.e. first wait for the RSI to be over 80 and then wait the
Need help with chart indicator delete function. https://docs.mql4.com/chart_operations/chartindicatordelete Edit. Problem solved thanks to Alain Verleyen. Misred the documentation.   
I just wanna confirm what is the default time zone in mt4 platform. What if I want to change it,can it be set according to my location
Good Day Everyone, I have a question regarding the use of an EA that has become unavailable. I have it installed and running on one MT4 platform but I would like to have it run on an additional platform as well. The source is not available for the download as I used for the original installation but...
  Oanda ForexT  (7)
I have an indicator I've written and it does the job on most of my forex pairs. I have an Oanda account and in the symbols list there is a tab "ForexT". Any pair in this list that I try and add my indicator to it doesn't appear. If I add indicators written by others they work. Hopefully there is an...
[Deleted]
  What is an INDICATOR?  (90   1 2 3 4 5 ... 8 9)
What is an INDICATOR? Take the time to laugh at the simplicity of the question or to answer it hastily. Almost all traders use indicators - some perceive them visually, some use them in trading software to make trading decisions. There are dozens of basic indicators and hundreds of exotic ones
Pls I need assistance on this code,if spread high is...return...No trade..But the problem is return (0) is added on the EA code it will not open any order again,but is I remove it Will start working again without regulating the high spread,this is the code..Any corrects pls.thanks double Spread =
Hello guys.. It's only a toy.. works only on MT4 backtesting, don't work on live account ( I mean, it isn't profitable like backtesting). It's based on renko ( I don't know it it's renko or mt4 that don't work../is crappy)... TP = 30 pips SL = variable (based on ATR.. but around 12 pips);  I AM HERE...
I have an issue on my custom indicator. It was working fine in the previous version but on this latest release, it does not print on the chart anymore. I have to use it on the older version of MT4.  Anyone knows how to fix this?   //standard initialisations above here int start() {    for(int...
i am using an ea saadscalper, but i want to have it only open one trade at a time. i tried disabling martingale both of them but it did not work. is their a script or something i can do so it only opens one at a time(not more then one)?
Hi, I am new to coding. I wish to know how to write a code to get  the RSI indicator's high, low and close values for YESTERDAY in a M15 time frame. Can anybody help me?
I found an interesting MT4 indicator which shows remaining time of the next bar in the chart. But that works for the particular pairs which I would choose. But I want that program to work/applied on all opened pairs by just applying to any of the opened one pair. Please check the code below
Hi, I'm totally new to MQL4. After hours of Googling and fixing but to no avail, was wondering if anyone can help me with this: 1) I tried to signal my buy trades with RSI < 30 but looks like it executes buy trades even when RSI is higher than 30... what could be possibly wrong? 2) It doesn't
Can date/time compiled be referenced by an indicator/EA? Would be nice to be able to display this so when debugging you know exactly which compiled version you are looking at. Or if a trader is using an old version vs. current version. Would be nice if this was displayed on the About Tab!
  Write orders in csv file  (13   1 2)
beh12zad: Hallo Sir, I want to write my total Order in .csv File, but this code writes thevalue of OrderType() and not the Order operation type like OP_SELLSTOPor OP_BUYSTOP. How can I change it? thanks in advance. #    open price    open time    symbol    lots 24497874    1.1288    2016.03.29 18...
Does Anyone Know of an EA, Indicator or Utility I can download to view the amount of current open trades on my account? I have been looking around and all I found was people who has posted coding scripts. Regards Franzel