MQL4 and MetaTrader 4 - page 487

  Tester Strategy  (4)
Hello, when I try "Strategy Tester" of an EA i have "graphic errors". How can I fix the problem? Thank you, Aldo
Hi everybody, I am new on this forum and on MT4. I am programing an EA with MT4 for the forex market and I would like to know if somebody has a smart way to close partially a position otherway than closing all and open a smaller one. Also,is there afunction in MT4 to get the current strategy profit...
Is there any way to replace + ascii sign with a wingding char (225 - arrow up) when the former is set as string and used in objectsettext as part of a bigger text? i.e. if (cur1>=(euril+eurih)/2){ eurm = "+";}elseeurm = "-"; when invoked by ObjectSetText("object","D1: " +...
Hi, I've tried hard enough to find a basic Expert Advisor base on this conditions. If anyone have any, can i have it thank you. Thank you. I have this code from my custom indicator. Anyone have any similar will do. as i'm still learning to code my own, i will try to amend it here and there. Thank...
  price allert  (4)
Hi guys, this allert sounds when the price exceeds or is on an exact price level set by the user when the user is charging, but sometimes it works and sometimes no, is there someone that can help me fix it ? extern double SuonoQuandoPrezzoSupera = 0;extern string Commento_Up;extern double...
Hi I am new to Forex and MT4 but I have programming background. I am writing my firs EA and there is one thing that bugs me, I had an impression that the logic flow of buying and selling the currency is as simple as buying something over the counter, i.e if i send a buy order, I am buying certain...
Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
Is there a way to, for example, have the compiler put the chart's _Symbol right inside a string? FileDelete("Sell_Symbol",FILE_COMMON); If not, Ill have 30 EA's instead of just 1 because of having to write every single currency pair in there. I'm sure there has to be someone else who has faced the...
I am using this code :       dc_haut[i] = High[iHighest(Symbol(),Period(),MODE_CLOSE,15,i) ];      dc_bas[i]  = Low[iLowest(Symbol(),Period(), MODE_CLOSE,15,i)]; It should drow on higher close and lower close of 15 Bars, and here is what I get : https://www.mql5...
Hi, I wrote a function with input parameters but I could not insert an operator as a string: void MyFunction(int Freccia, string Dir){    //.......My code    ObjectCreate("Freccia"+T,OBJ_ARROW,0,Time[1],Low[1] Dir 30*Point);     ObjectSet   ("Freccia"+T,OBJPROP_COLOR,White);     ObjectSet...
Since upgrading to MetaTrader 4.00 Build 1031 (17 Dec 2016) I face connectivity issues on my virtual server. I have 4 clients running on a virtual server (Windows Server 2012 R2). It now happened two times, that after about a week one of the terminals showed "No connection" in the status bar. I...
The last published code in Code Base is dated 2012-09-29. Prior to this, multiple publications every month.....?  
Hello, this is my rule for closing a sell trade: if((Bid>iATR(NULL,0,14,1))) please could somebody tell me what I need to change in that code if I wanted to use three times the ATR (14) value (creating more distance from the bid, not a longer lookback period for the ATR)? Thank you!
Hi, I was trying to print my code on metatrader4 language editor, I clicked on print and print preview but nothing happened. I tried with another mt4 platform editor (the first one was alpari mt4, the second one was tickmill mt4) but the same problem happens. I cannot also access the print setup...
Is there a way to add additional timeframes to backtest on MQL4?
  OnTimer problem  (6)
Here is the mql4 code (and below it the mql5 code) of an OnTimer function that works well in MT4. It flashes an object and plays a sound for one second when a new bar is created. It also warns me when a Symbol has not had a new tick for two minutes. Have tried to convert the code to mql5 and have...
I am creating a custom indicator and I am facing a dilemma on the approach I am currently using. The indicator creates approximately 300-400 labels (prices & calculation results), most of which are live updated, like a hud. My initial approach was to create each label like that: obname=Name+"...
Dear Gents, I just started coding a little bit with mql4 and after studying some literature I wrote my first own EA. Compiling was without errors, but I cant get my EA to go into positions. My Idea was to open a Buy and a Sell Position at once, when the current Bar is crossing a shortterm Moving
I want to close SELL order after a BUY order is opened. I wrote this code but I have errors 138 and 4108, how can I fix it? ps: the orders are generated by SELL LIMIT and BUY LIMIT functions    if (OrderSelect(ticketBuy,SELECT_BY_TICKET)){            if  ( OrderType() == OP_BUY ){...
I have this in my EA and it compile and run with no errors. All trades are made in backtester as well. But it seems to ignore the breakeven totally... Is there something wrong here? extern double    Breakeven = 30;//+------------------------------------------------------------------+//| My...
hi,  can someone tell me what does this function? https://docs.mql4.com/customind/setlevelvalue i have SetLevelValue(0, 50);SetLevelValue(1, 68);SetLevelValue(2, 32); and get such image: i cant understand how they act...
I am strange with mql4. Now I subtract two value Bid - MydoubleVar . But Result is not look like from calculator result. eg.. Bid value is 1.01424 MydoubleVar is 1.01427 If I used like that MessageBox(Bid - MydoubleVar); Message Box replied that -2.99999999999 Normal Calculator result is -0.00003...
Hello, today while sending a buy stop order on GBPJPY I received this error #130 (invalid stops): 2017.06.07 15:19:35.353 '7626221': order buy stop 0.5 GBPJPY opening at 141.394 sl: 0.000 tp: 0.000 failed [Invalid S/L or T/P] How's that possible since the stop order was sent without SL and TP?...
hey all..... please don't spend undue time on this, but perhaps someone might know offhand..... a trade management ea manages all trades on all pairs.... sometimes the orders per pair might reach a hundred.... think of like grid trading..... the number of trades roughly correlates to the recent...
Hi,  I am new to MT4 & % and I have both installed on my computer. I was reading an article on the 10 best strategies and liked the look of Binary Wave. Trying to install it, I have the Binarywave.mq5 in the Expert directory under a new folder Binarywave/ I have also included the smoothalgorithms...
Hi, I have a small problem with the ArrayMinum () function, because it can not read the lowest value of the matrices. Instead, if I use ArrayMaximun it works all over again. //Global Scopeint m=0;double CLOSE2[8];//----------------//for(int L=2; L<10; L++){                    if(Open[L] >...
Hi friends, I'm working on an EA and I'm going to lighten my EA code lines, so I decided to use the #include preprocessor and put some of my functions into the .mqh files and use them by putting the #include directive in my EA's code. I actually have a problem with declaring global variables. I'm...
Hello! I want to achieve the effect of built-in Fractal indicator - shifting arrow plots above an below price action by a certain number of pixels. In MQL5 PLOT_ARROW_SHIFT does the job perfectly, but I couldn't find anything like that in MQL4. I'm aware a similar effect can be done with another
I was reading mql4 WebRequest() docs and it is turned off during backtesting.  So is there an alternative method(s) to download data from the internet, process it, and then incorporate that data into the backtest when IsTesting() is true? edit:  one of the uses will be to download historical news...
Hi, I try to use 'else {}' code when market closed just it could play. But two sounds mixed, where is a problem, please? // SELL if ( sparam == "SELL GROUP" ) { ObjectSetInteger ( 0 , "SELL GROUP" , OBJPROP_STATE , false ); _ticket = Order ( "SELL GROUP" );