MQL4 and MetaTrader 4 - page 178

Hi All! I'm making my EA as a Copier. Everything is going well until now. EA is now running good in master mode, but in slave mode could only open orders and modify changes, but can not close orders by itself when master closed. Please help me to debug my code below: P/S: When i close orders in
h write this function string triger() { if ( iClose ( Symbol (),timeframe, 1 )> iOpen ( Symbol (),timeframe, 1 )) { if (( iClose ( Symbol (),timeframe, 1 )- iOpen ( Symbol (),timeframe, 1 ))>( iHigh ( Symbol (),timeframe, 1 )- iClose ( Symbol (),timeframe, 1 ))) return (
I am trying to produce the same result as OrderProfit() method by calculating the trade profit manually, but the result is inconsistent (25.73 vs. 25.74) . Looking at the numbers it doesn't seem to be rounding issue (unless mt4 is somehow internaly using MathFloor() on the profit rounding or smth?)
I am trying to Read values from a file but struggling for past few days (its the first time i am trying to read the file so pardon any mistakes ) I cant figure out what i am doing wrong here. here is the simplified version of the code: Here i am trying to read the values from bin file struct
Hi, I'm after a FX broker that support the use of signals from MQL5 with a leverage of 1:200 or more. I'm based in Australia and apparently the max leverage allowed here is 1:30 (unless using a PRO account which is not my case). Thank you Martin
  time filter  (4)
i use ea with martingal and i wana using time filter just for FirstOrder no for other trades .. some onecan help me.. ****************************************** extern bool UseTimeFilter=true; extern bool MON = TRUE; extern bool TUE = TRUE; extern bool WED = TRUE; extern bool THU = TRUE; extern bool
hi sir I want to know if it is possible on MQL4 to code a function that will close my trade and delete my order at the same time if a Take profit target with the given magic number is hit? is Yes, what should I do? thank you so much
  channel  (3)
does anyone have the mql4 file for this channel or know the name of the channel? How can I get the mql4 file please
is there a way on how i can count the open trades and pending order that have a take profit greater than zero
I do not understand one thing. Since Meta Trader, Windows, Android and all scripts, strategies and Expert Advisors for MT4 are written in C ++ or C # or similar C language. So far, Android has not created the MQL compiler under MT4 yet? I mean no MQL Editor for Android. Besides, there is no...
I am wondering if it is possible to have non-drawn buffers which are not shown in the color tab, but their value is shown in the data window. Below is a detailed description of the problem. I have an indicator which has four buffers. Two of them are drawn on the chart, showing some arrows. Indeed
Hi experts, when recompiling an indicator I see a couple of (red triangle) messages in the Experts log about x number of objects of my program class undeleted/left from the previous version's deinit I never used class pointers nor the new operator, I just declare variables of that class, I was
I can not download the free demo of my own product . Free Demo download is not available. It says "İnstallation Failed" What is wrong about it. I dont know which unit to ask that
Here is the code: #property strict struct MyRates { datetime time; // Period start time double open; // Open price double high; // The highest price of the period double low; // The lowest price of the period double close; // Close price long
Recently I'm excited to find some youtube tutorials about onchartevent and button and dialog,etc. in official library. I successfully wrote a code with button, as well as with button in a dialog. But then when I tried to code a dropdown list (not in input and ENUM..., I want the button in chart), I
This took me a full day of troubleshooting, including an uninstall/fresh install of Metatrader 4 before I managed to find the culprit. The problem is I don't have a clue what to do about it. Here's the code for an indicator, as simple as could be, only 2 executable statements, compiles fine. When I
I am trying to find the 2nd highest sell and 2nd lowest buy What is actually wrong with my comparison for populate the 2nd highest and 2nd lowest? double Highest2ndSell() { double highest2nd= 0 ,highest= 0 ; for ( int i= OrdersTotal ()- 1 ; i>= 0 ; i--) // { if ( OrderSelect (i
  ARROW problem  (1)
Hello, I have a problem with my code, it doesn't place an order when the arrow from the indicators appears Thanks for replying :-) Those are my code for INDICATOR and EA ////// EA ////// //+------------------------------------------------------------------+ //|
Hi guys, I was hoping someone could help me out. Coding is not a strong point for me but I am trying! I'm experimenting with basket trading and would like to try something out but I'm not sue how to do it. Assuming I have multiple sell orders spaced by x amount. When I reach a certain number of...
improper enumerator cannot be used double ism0= iStochastic ( Symbol (),Open_Red_Blue_TimeFrame,Stochastic_K,Stochastic_D,Stochastic_Slowing, MODE_SMA , PRICE_CLOSE ,MODE_MAIN,Open_Red_Blue_Trade_Bar);
so i am trying to tranfer code from trading views pine script to mql4 for mt4 but all calculations of custom indicator are done right...but it doesnt plot it here is the original script and here is my code plesase help! ------------------------------------------------------------
I've used the strategy tester before without a problem. However, now it will not accept inputs for any testing. I can use the strategy tester in visual mode by establishing default inputs in the EA, but that won't work for optimization. I've looked for other settings but found nothing. Selecting
Hello everyone! I'm trying to make my EA to get data from online CSV file and write down to a local file, but it worked wrongly. The destination file is only saved with the word "FALSE" inside as data, even i tried some other function to write data. So, please! anyone can help me to show my mistakes
Is there anyway to reset my password? My details are in my MT4 program but I can't find where I recorded my account details. Please help
Hi everyone, I only recently learned how to easily display completed trades on the chart (without the help of an indicator or script). Simply go the MT4 terminal, change to the "Account History" tab and then use the mouse pointer to drag the column with the desired trade on to the chart. You will
I haven't used MT4 for several years. Now having downloaded it I'm unable to alter the vertical scale. Also, I get duplicate copies of each chart, below the main one. Can anyone help me with these issues? Thanks in anticipation. I'll try to attach a screenshot
hi guys my EA has has a function of 1. delete pending order for buy 2. close open order for buy 3.delete pending order for sell 4. close open order for sell when I coded my EA I made it in to two different .mq4 BUY.mq4 and SELL.mq4 to avoid confusion, all is working perfectly fine. The problem
  Grid Problem  (9)
Hi all I want to open the 3rd trade at 100 pips. Below the code I've shown it will not open the 3rd trade at 100 pips, instead it will open the 2nd trade at 50 pips which is correct. I would like to know what I'm I doing wrong. If you know the problem please help! int CountTrades() { int Count= 0
int OnInit() { { int AcctNbr = 0; if(AcctNbr > 0 && AcctNbr != AccountNumber()) {Print("Account not allowed"); return(-1);}} //---- drawing settings SetIndexArrow(0, 119); SetIndexArrow(1, 119); //---- SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 0, Red); //SetIndexDrawBegin(0, i-1);
Hi, I am very newbie with mql5 and I wrote a function to return bool value. It seems I am missing some parenthesis but I don't bool isSlBuyNear () { bool slBuyNear = true ; double slBuyDis = calSLBuyDist(); double validSlDist = updateSlDist; if ( slBuyDis < validSlDist) slBuyNear = true ; else