MQL4 and MetaTrader 4 - page 300

To post a new topic, please log in or register
extern double LotSize = 1;extern double StopLoss = 0;extern double TakeProfit = 0;extern double MALength = 5;extern double TrailingLimit = 0;extern double TrailingStep = 0;extern int MagicNumber = 1;extern double Buffer = 3;//============= Global Variablesint LongTicket;int ShortTicket;double...
TimeDaylightSavings()  . It depends on the time settings of my computer(local time). How to get TimeDaylightSavings on server time ? Thank you
hi,guys,I'm a newbie to learn mql4,recently,I downloaded mt4 from here,registerd a demo account and try the following code on EURUSD M1,my origial goal is to know what price function OrderOpenPrice() would return when the order is pending,so the BUYSTOP order price is set to be 5000, but i got a...
Cheers, i was not aware that decompiling job is not allowed, and my account now is banned after i post a decompiling job. How i return my account now?? Regards
In my indicator I create vertical lines with this code string line_name = INDI_NAME + "_" + (string)Period() + "_" + (string)time[i];ObjectCreate(0, line_name, OBJ_VLINE, 0, time[i], NULL);ObjectSetInteger(0, line_name, OBJPROP_STYLE, line_style);ObjectSetInteger(0, line_name, OBJPROP_COLOR,...
...Compiling passed if there is neither double quotes nor semicolon. ...Compiling failed if double quotes were completed and semicolon added. ...Please refer to the screenshots below.            
yesterday the push notifications from MT4 on my iphone 6 plus stopped working. can anyone help  please    thank you 
Hi!   I have coded an alert for my Ichimoku trading, all it does is check for available conditions, and if met it send and Alert(). It is working well, but what I notice is that when I open up the terminal for the first time each day, it sends through yesterdays alerts as well as today's alerts....
During coding and testing of my software I hit some issues with performance and wasn't able to find suitable answers here on the forum. Maybe the one or other could explain the behaviours that I run into: Say I have written an indicator that does XYZ. What happens usually is the well known...
Hi guys, If I place an order of let's say take profit 500 and stop loss 100. I want the order to break even when it gets to 100 profit (which is easy enough to code) however, I want the stop loss to move up every 100 pips (not trail) by 100 pips. So it will take incremental steps towards the take...
Hello, I would be very grateful if someone could help me with my problem. I need the amount of the balance in one of my indicators. Which I get with the function AccountBalance(). The problem is: when I change the Account in the MT4 (Login with an another account and the indicator is already in the...
Hi all, i was studying the article of interaction between matlab and metatrader via csv file. I create the code in matlab, and matlab create a new txt file with results (In this case, moving average of period 5). When i try to plot this moving average in Metatrader, i have a error, because it no...
Hi coders, I made a simple example of a function within a script. Is it possible to return not only the high but also the low, open and close of the outsidebar? Would it also be possible to return the iBarShift for that bar because this would be an int-value and no double. Thanks! double...
I downloaded the Dukascopy tick data and then used CSV2FXT to convert it . If I want to run backtest by broker "A" with GMT+2 and European DST. How to set "FXTGMT Offset" , "FXTDST setting" , "CSVGMT Offset" , "CSVDST setting" ? Thank you
I am creating an indicator where the values change dramatically then the day changes.  The problem is that the lines drawn by MT4 with the values in the indicator buffers connect all the points, so the last value of day A is connected to the first value of day B and the result is ugly. Is it...
GregorAnton
I am able to run a batch file from the command prompt just fine  BUT when I try and run from Metatrader I get Error 2 Code. MQL4 Script: #import "shell32.dll" int ShellExecuteA(int hWnd, string Verb, string File, string Parameter, string Path, int ShowCommand); #importint r=ShellExecuteA(0, "Open",...
Hi folks, I am a newbie in coding and I am coding a Zone Recovery EA, but I am stuck with this problem for a while and still unable to fix it. I've extracted out a section of the source code as you can see below. This section of codes is supposed to make the EA do the following: 1) Open a BUY order...
Dear Everybody in the house, Please I need your assistance over this issue: I created an ea to open multiple orders (3 orders) simultaneously with the same stoploss point for all but different takeprofit for each, when the price gets to certain points it is expected of it to modify the stop loss to...
Hello forum, good day. I´m working on a Market Orders EA that may open only one order at a time but there may be several open orders during the day. Up to what I have, several orders remain open, but I´m having a bit of trouble on closing each order separately when certain criteria is met; I need to...
hi the markets and my orders arent moving on mt4, i just got a new modem, everything was working fine lastnight. could someone help please
Hi, Using the function AccountFreeMarginCheck() before placing an order and controling the result after the position is open I can see a slight difference. Where does it comes from?    Here is an exemple from a real account I use for testing:  FreeMargin before the opening =986.3265   MarginCheck=...
Hi everybody, I have tried to code the mtf indicator to display levels as short lines. But the problem i'm facing now is that i have a numerous of extra levels at the previous daily, weekly and monthly level that showed up and i don't know why. I would be grateful, if i could get some help to...
I try to compute MA to check if the fuction iMAOnArray gives the true result. I find the same result for SMA, but not for EMA, can someone check my code ? double iMAOnArray2(double       array[],          // array with data                   int          total,            // number of...
Is there an indicator for price Logartihmic for MetaTrader 4?   I mean, is the Logartihmic Scale charts
Hey guys, I have coded an EA and it places perfectly on strategy tester but when it comes to placing on my live account it places occasionally (some days it will place on a currency pair and some days it won't)? Which leaves me frustrated. Do any of you wizards know what could be the problem? Thanks...
Hi there,   I tried to display the time and Balance, but I am seeing nothing.  void OnTick()   { //--  The algorithm  ----------------------------------------------------   3  ---    Alert("aaaaaa",TimeToStr(TimeCurrent()),AccountBalance());    Print("Time=",TimeCurrent(),"Account balance="...
Is it possible to receive a notice to my iphone from my EA alerting me to a trade signal without the EA opening the trade??
I have a program in which a local variable, temp1, is assigned a value based on the highest value of an array.  It does this without any problems.   The comment block looks like this when I run it with the last line commented out.   480 is the value of temp1 at that point.  In the very next line of...
Hi,   I found that "Print ()" cannot print messages to expert log during backtesting. Please advise how to print message for debugiing purpose during backtest.   Thank you