MQL4 and MetaTrader 4 - page 530

Hi guys. I am trying to write an EA which will auto download a file from the internet, then read data from that file and then execute trade using those data. but i encounter problem with downloading file. the file i download got a bigger size compare to the one on the server. If I run this code on...
Another proof why an EA has most of times completely different results on live. Imagine that bug on a live account with real money, easy way to lose your money thinking that it is because a bad robot. No always! Sometimes may be because of a platform bug. On tester, orders 3 & 4 close with pips gain...
Hello! I have a problem. When a use hash.mqh in EA then I have a bug I attached my EA but dont attached dll file. log file: --- 2017.01.12 19:37:37.572 hashtest USDCHF,H1: invalid pointer access in 'hash.mqh' (631,24) 2017.01.12 19:37:36.249 hashtest USDCHF,H1: checkHash:true 2017.01.12 19:37:36...
Hey Guys its kinda strange, and i don´t get the problem solved. Maybe some stupid failure pls help ;) a bit German included but not important ^-^ This works perfectly. void drawVerticalLine(double Rastercounter, int Teilnehmer) {     string  lineName   = "asdf";       if(ObjectCreate(0,lineName,...
Hi everyone! I'm trying to merge some indicators using iCustom. An indicator which I have problem with is TrendChannel.mq4   Parts of the code are these:  extern int  degree = 1; extern double kstd = 2.0; extern int  bars = 48; extern int  shift = 0; extern int  AlertPipRange = 5; extern string...
Ok this EA has been running for about 6 months. Just thought I would check a funny sell order, and this is what I found. The Trace line printed 3 different time event series on the same line!  1. My trace showed IMA moving averages of USDJPY  showing at yellow line on chart.(115.994 ma3)  (115.966...
  script help  (1)
I found this script on the forum for limiting open orders but I put it into metaeditor and it givevs me errors when i try to compile it. and would this work with an ea i have on a char like eur usd or usd jpy?   #define MAX_ORDERS 5       ...    if(OrdersTotal()>=MAX_ORDERS)      {       // Don't...
I get the 130 error from time to time and i cannot figure out why this happens. I place two pending trades - a Buy stop and a Sell stop. The one will get accepted and the other is rejected with an error 130 message. I use ThinkForex which have no minimum StopLevel. They are a STP broker. My Stop...
  Sunday night price bars  (16   1 2)
I trade daily bars, but the Sunday night bars are useless to me, and they skew the price patterns I'm looking for.  Is there any way to either: a) delete these bars from the chart, or b) blend the Sunday prices into the Monday bars (ie. make the 2 bars become one), or c) identify a Sunday bar in my...
Hi, Am I correct, that there is no function or system-variable that tells a class whether it is called by an indicator, expert or a script?
Hi, 1st, sorry my english. I have crossing moving avarage robot, but if it has an open order, dont open another order until have closed the previous. This is the problem? Thank you
I have never considered this before. I just wondered if anybody actually knows the order of an iCustom() call in an EA. Is the iCustom executed before the the code in OnTick that uses the value? I ask this because I am currently working on a project where the iCustom call is only executed on a new
Please, what function opens the scripts to EA?      
Hello. You know kindly tell me, how can I create, the "v_line", to use as a separator period (say monthly), so I remove the default ones of mt4. thanks  
Hi, I'm attempting to implement a parabolic SAR based strategy using a source created using EA Builder. When I compile the code, the error shows:  '{' - function definition unexpected The error relates to the item highlighted below:    {Strategy: Parabolic change - 1 day   Created with EABuilder...
Hello Friends, i'm a beginner for mql coding, i tried too much but i could'nt write an EA correctly that i thought, maybe somebody help me about this, steps are as following; 1- EA will open 1 BUYSTOP and 1 SELLSTOP using highest and lowest of last 3 bars, OP_BUYSTOP at Highest[last 3 bars]+5 pips...
Hi guys, i can't make updating my pending orders on every price changing, moving following price until 3 sec before news relaese (yeah another news trading ea). I wrote an ordermodify but seems to work just once. i saw many ea on youtube that create moving pending order until news relaese, but i...
I would like both EAs to have the ability to trade ALL cross-connected instruments regardless of prefix or postfix or whatever chart the EA is operating on, this will save me having multiple charts open with multiple EAs running on both MT4 terminals and reduce CPU/RAM lag. Hope you guys can help
[Deleted]
  2 - Common Error  (11   1 2)
I have code which has worked for a while and for some reason I am now getting the above error the code is RefreshRates (); string st_50020=MyDT+ "50020 OBS ASK = " + DoubleToString ( MarketInfo (My_OrderSymbol, MODE_ASK ), 5 )+ " BID = " + DoubleToString ( MarketInfo (My_OrderSymbol
Hello, Can an EA know my MT4 account password by accessing the .DLL file? I mean when I allow to import the .DLL file included with the expert advisor. Thanks
If you use an Expert does it automatically liquidate you position if you end it? Or do you keep the last position until you close them manually? EX: If the Expert Buy 1 lot of USDJPY and you want to end the Expert does it automatically sell any open positions it created
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...