MQL4 and MetaTrader 4 - page 120

Hello everyone. I am trying to code buy order execution when the Bid reach above a price that ObjectGetValueByShift will get the object is a Trendline double Price = ObjectGetValueByShift( "Trendline" , 0 ); if ( Bid >= Price) { int Ticket_Number1= OrderSend ( Symbol (),OP_BUY
The manual says about TranslateKey: "Returns a Unicode character by a virtual key code considering the current input language and the status of control keys." Does that mean I can print Unicode characters in my labels and buttons, for example? Apparently, not. I couldn't find a single Unicode
Hello ! How To Recognize PIP Size in decimal places ( PIP, not Point ) ? I had idea like this : string Instrument = Symbol () ; double PIPSize ; double PointSize = MarketInfo ( Instrument, MODE_POINT ) ; if ( PointSize < 0.0001 ) PIPSize = 0.0001 ; // for most currencies if (
This is the problem : I get an Array witch has collected the R/R of potentials trades . its name is "atd_RRCandid [Symbol] [SetUp] [TypeTrade]" . I have to precise that the precedent function has transmit the real data (not relative one) , like in Function( string fsSymbol, int fiSetUp, Int
Is it possible to set a Daily Loss Limit based on Daily Equity in the MT4 platform? I would like to have an option that the software Closes all Open and Pending orders once the set Daily Loss or Profit are reached. Thanks for help
Hi I've met ordermodify error 1. I know the reason why it returns error 1. The problem lies in changing the open price value with the same value. I tried to break the loop but it still return the same error. Anyone can help me why break statement isn't working here? void UpdateOpenPrice() { for
[Deleted]
Run this Expert. It should delete all variables that are older than 60 sec, but it deletes ALL variables. The parameter int GlobalVariablesDeleteAll ( string prefix_name= NULL , // All global variables with names beginning with the prefix datetime limit_data= 0 // All global
1 //+------------------------------------------------------------------+ 2 //| fmcbr_v1.1.mq4 | 3 //| Mohd Syawal Sakawi | 4 //| | 5 //+------------------------------------------------------------------+ 6 #property copyright "BlackzGunz" 7 #property description "" 8 #property link "" 9 #property
Newbie with some questions to ask 1) In MetaTrader 4, if an EA is used, Is there some way to set the initial "Investment Amount" so that MetaTrader 4 will use only this amount to trade for the full Trading Session ? 2) In MetaTrader 4, if an EA is used, Is there some way to set a "Flag" such that
So i downloaded MT5 3 days ago just fine but when i tried to download MT4 rn it says that its not awailable in my region Does anybody have some information about a potential ban in germany for MT4/5? I checked on another phone and there it seems to be the same case. Thanks for the help
Hi all, is there a function to zoom in and out the view in a .mq4 file in the Editor? Thank you
Currently, mql4 can only provide time down to the nearest second for incoming ticks. We use the following function: MarketInfo(Symbol(), MODE_TIME) 1) Is there a different function that can provide millisecond time stamp or can be used to determine milliseconds for tick data coming to the platform
Hi, array out of range in 'test.mq4' (15,9) (15,9: Array[0] = 1.0; ) void OnStart () { double Array[]; ArrayResize (Array, 3 ); Array[ 0 ] = 1.0 ; Array[ 1 ] = 1.0 ; Array[ 2 ] = 4.0 ; double ma = iMAOnArray(Array, 3 , 3 , 0 , MODE_SMA , 0 ); Alert ( "result = " , ma); } Why does it
I have put my EA into my MT4, when I am gonna run it, it says the EA can't be load. Is there any fix for that? I am running it on a VPS, with Windows Server 2012 R2. Any help will be appreciated
I'm trying to get a shape to appear above the opening bar of each opening, which I can do on a day period, but when I switch between other periods --- I cannot figure out where the opening bar is on each opening bar because of the way bars are number in reverse --- 0,1,2,3, etc.. except for the Day
Hi, I had developped a number of expert indicators, scripts etc. back in the day. I have kept a copy of them and I want to use them again. My question: are old MQL4 indicators still compatible with the current version of MT4? If so, when can I copy my old files, in order to have them work? I ask
Hello, I am trying to Modify or Delete the old Order and Create a new Order for a Pending order if prices moves in my favor giving me a better entry price. Initially I want to open a BuyStop 5pips above the current Ask. Then if price moves lower keep reducing the gap maintaining a 5 pip gap. If...
I'm developing a flutter app to make the user login through metatrader 4 and see the account status like balance and profit and order from the metatrader 4 its self from its data for the users. if there is no can you please tell me any alternative ways to do that easily
Hi I have tried to implement a time filter to turn off trading during high spread times, my broker is in Greenwich mean time (GMT+3), I want to turn off the ea 1 hour before New York close, and continue to untill 2 hours after the asian open. Basically it does not turn off. Any ideas? Thanks
  MT4 on Chrome OS  (1)
It's now possible to run MT4 on Chrome OS (mostly: charts are not working yet). Here's how: Last year Google released a way to run Android apps on Chrome, so all you have to do is pack the MT4 Android app apk and you're done. I now have MT4 running on my Chromebook! Just download the APK format file...
Hi I've created 2 EA now and I build it with the idea of using the first EA as a template for the second one. There's a section on the EA which is to manage an open orders, in this case I use this 3 function to manage close, update open price, SL and TP and also take a partial TP. CloseOrders()
hi, i'm new in mql and i want to draw vertical line in first candle of each day in chart, please help me to find out how can do this, thanks
[Deleted]
Hi, I need to put an indicator in a chart MAIN window, but I don't want it to be related to the Price, I want an independent scale. All I need is histogram, but not in a SEPARATE window, but in a MAIN window. Not linked to the price of the Price
1. My min brooker stoplevel is 2 pips, but I want to set sl/tp to 1 pip. What's your idea? Create an array to store SLs/TPs? or store them in a file(.csv)? Once the price reached those levels, then close the relevant positions. 2. I wonder to declare a few variables as global or inside OnTick()
Hi, I have linked two MT4 accounts, so a slave accounts copies a master. Limit or Stop Orders (to enter trades) are placed manually on the master account and what the slave needs to do is run and EA using as input the price level of such orders. I could run a loop on total orders but how can I tell
Hey gang, I'm running into a puzzling issue with this EA. Any help would be very appreciated! I'm not sure exactly what information will be most helpful, so I'll try to give enough info without giving too much. Let me know if you want to see any other bits of the code, or have it explained further
Hello, I developed an EA, it creates duplicate orders based on price and symbol. I am looking for advice on the best way to introduce a function "MaxDuplicateOrders" that will limit the amount of duplicate orders initiated. I ordered freelance work but the code is not successfully enabling me to
This error shows up when i try to find max array from these variables: Constant Expression Required. i've had a go, any ideas? double num_array[ 3 ]; num_array[ 0 ]= RFTPD8; num_array[ 1 ]= RFTPD7; num_array[ 2 ]= RFS3; double num_array[ 3 ]= {RFTPD8,RFTPD7,RFS3}; int maxValueIdx=
I have a file writing function which has been rewritten, specifying the data from the OrderHistory log. It now checks to see if the file exists before deciding to either create a new file and write the relevant data into it, or find the existing file, go to the end of the file and write data. For
Hi guys So I have an EA that I am trying to code and half of it works. Only the buystop opens but not the sellstop, and it seems like a simple fix but i cant wrap my head around it. please help Here is my code: input double Lotsizeforbuy = 0.10; input int Distancebuy = 500; input double