MQL4 and MetaTrader 4 - page 206

Hi, how can i get info about POSITION_REASON at MQL4 ? At MQL5 the function is PositionGetInteger ( POSITION_REASON ) i dont find the function at MQL4
Hello to everybody, I am getting mad in dealing with array passing to a function. I have defined a function called clear(), with the following prototype void clear(string &[],int); and defined in such way: void clear(string &myArray[],size) {} But when I call the clear function  string...
I need some advice for the below code if you please, 1- for some reason, I get a note of "array out of range " in Mt4 expert journal 2- although Period_MA is external variable and I set it to 20; but when I am testing my code by changing for (x=i; x<i+Period_MA; x++) to for (x=i; x<=i+Period_MA ;
Hi I want to make a stoploss strategy using the lowest price of numbers of bars (in my case 5 bars). this is the code that I came up with: int highestPriceShift = iHighest ( Symbol (), PERIOD_CURRENT , MODE_HIGH , 5 , 0 ); int lowestPriceShift = iLowest ( Symbol (), PERIOD_CURRENT , MODE_LOW , 5
Hi, I am back with another question. Do you have any solution to close all stop orders ? I've been searching for a while but still haven't found the answer. below is my Pseudocode if ( OrdersTotal () < 2 ) { //close all pending orders } Thank you very much for spending time to help me
Hi guys, I need this indicator to have an alert every time the bar changes color. (one color is bullish and the other is bearish), attached I leave the indicator, if you can help me <Decompiled code deleted>
Hi A question for MetaTrader Gurus. For a particular symbol, when a trade is closed, I would like to open the new trade with a 15 seconds interval. Any code snippets please? I would like to express my gratitude in anticipation. Thanks and best regards, Long John Silver
can you create alerts , the alerts in alert tab in the terminal i mean , using scripts/indicators
Hi, I just installed my <Deleted> EA. The balance is ready. The smiling face of the EA is up. I checked the expert tap and it shows the EA is initialized. I checked the Journal tap and it shows the EA was loaded successfully. Anybody knows what's going on? Do I have to wait for a few days for the
  Expert Adv. Help  (6)
Hello everybody; i have a robot in my hand. i want to trailing stop in system but i cant do it. is there anyone who can help me? Thanks... //| day open_baris.mq4 | //| Copyright 2014, MetaQuotes Software Corp. | //| http://www.mql5.com |
Hi guys, Today I started up my computer and noticed that my accounts where gone. So first I setted these up again. Next I noticed my most important indicator is gone. So I went to Indicators->Market and tried to add the indicator I use most often. However, I can't attach it to any chart, it just
  Need help  (3)
Hello traders Maybe somebody have Adc Oscillator indicator MQL4 source code
I am trying to count the total lots for all open Buy trades but the EA keeps on going through the loop and does not stop adding the lots together. So in the first round it calculates the total lots correct but then keeps on adding that amount of lots over and over. I want to stop it once it has gone
  Update Array  (1)
Hi. I'm currently working on my first EA and I have grown pretty desprate. I actually want to fill my array[0] with the recent indicator value and have the previouse value move to array[1]. void OnTick () { if ( OrdersTotal ()> 1 ) return ; double arr[ 2 ]= { 0.0 , 0.0 }; for ( int i= 0
Hi guys. I have EA (ex4 file) I want to add some filter on it so I have decided to make indicator that will calculate some algo and after it enable or disable auto trader or live trade. witch one will be possible. Please help me. Thank you.
Hello Community. I'm creating a new class for working with orders. I haven't worked a lot with pointers. There is a Class "COrder", it contains all the information about the order. class COrder { public : int ticket; int type; int magic; double lots; double
MetaTrader 4 Client Terminal build 418 MQL4: Fixed the functions call from the external DLLs that could sometimes cause crashes. MetaEditor: Fixed the binding of mq4 files to the latest launched editor. Fixed errors reported on the forum and in crash logs.The update is available through the...
I would like to get data from a custom indicator in mql4. I know that how to do that in mql5 like this. int indicatorHandle = iCustom(Symbol(), Period(), indicatorName, ...);double tempArray[1000];CopyBuffer(indicatorHandle, 0, 0, 1000, tempArray); I search the document
My Mt4 does not show an error but the site shows an error. I checked my MT4 but it doesn't seem to have any bugs. What is this problem
I am a new user and cannot for the life of me figure out how to subscribe to the mql4 signals. I have installed both the mql4 and mql5 clients on my desktop, however only the mql5 signals appear in the client
  Manual order and EA closing  (18   1 2)
Hi guys, I would like to ask this question, If I don't placing (omit) a magic number command in the EA, will my EA still monitor and closed my manually ordered. Thanks for any advices from here.... AZR
Hi all, I'm trying to find the lowest value in an array that is determined between the last closed order and Timecurrent(). I'm always getting the last value of the buffer instead the minimum value of the array. I've tried to change every parameter but so far no luck. Please could you help me out
Hi guys and complements. The following is a code is designed to show true if a new candle is seen for the given time frame (Not necessarily the current timeframe) . However it does not branch to the 'true' section, only to all the 'false' sections. What could be wrong with the code pls. Thanks in
[Deleted]
Hello, I have a EA that open trades and works normally in demo, but in real account don't open any trade, I have tested demo in many brokers mt4 and give the same results. Recently I have opened a real account with a VPS but EA don't open any trade, in journal of mt4 seems normal I don't have any
I'm working on creating an EA that purchases long when the price (close) crosses above the MA line and closes the trade when the price (close) crosses below the MA line. My issue is that when I run the strategy tester, it is opening and closing the trade immediately. I've used an online generator to...
Hi! I want to explicitly convert 'enum' type into 'int' type. // --- global variables ---enum TRADE_TYPE{DontTradeType,TradeType,BuyOnlyType,SellOnlyType};TRADE_TYPE Trade_type;// then I pass 'Trade_type' into function call - SetBtnText(setSparam, Trade_type);// --- TRADE BUTTON TOGGLE...
double Recent_TD_Point[]; for ( int i= 0 ;i< 3000 ;i++) { if (High_TD_Point_Value(i)> 0 ){ Recent_TD_Point[i]=High_TD_Point_Value(i); Print (Recent_TD_Point[i]); } } //------------------------------------------------------------------------------ double
When I click a button I hoped that the trendline tool can be clicked -- it appears the mouse is prepared to draw a trendline -- but I have searched all over to come up with no solution. I guess what I am saying is how can the user know that they can draw trendline through the use of a button without
Dear everyone, I used 2 accounts for buying same signal from a signal provider. Now i want to refund back my money .Is it possible for refund money ? I bought it by Debit card Account 44098480 (XMTrading-Real 34) Thank you
Hello, i would like to test the mt4 connector for binance a github project MetatraderToBinance. Looking for help to set it up. Link https://github.com/fauxl/MetatraderToBinance/tree/master/Binance