MQL4 and MetaTrader 4 - page 131

Hi. The following code gives buy or sell signal with alert when bSetup or sSetup equel to 5 . I want to have buy and sell signals with alert when sSetup or bSetup equel to 5, 11, 13, 15. Can anyone solve the problem? //+-------------------------------------------n-----------------------+ //|
Hi, Can someone please tell how to put some text vertically or diagnolly starting from the High of each bar on the current chart I tried below code but it it showing somewhere in the middel of chart. ObjectCreate("test",OBJ_LABEL,0,Time[1],Close[1]);ObjectSetText("test",DoubleToStr(AccountBalance()...
Hello I was reading the documents. In the description section of the ArrayCopySeries() function, I did not understand this part well. What is meant by "Excluded are arrays that are assigned as indexed ones in custom indicators" ? When is the array copied? Do you mean arrays mapped to the buffer
ChartSaveTemplate(0,"FileName") create MQL4\Files\FileName_AUDCAD_Ini.dat !!! But According to the document , it must build templates\FileName.tpl How can create tpl file
Hi Friends, your help is seriously needed and appreciated. I tried to add few codes just to display EA parameters as well as draw three lines. But it was failed. There is a custom code function to add special function which was not built in their standard functions. I would like to use this custom
Hello I need to convert a pine script code to mql4 language 1st trial indicator with indicator arrows on chart to compare it with the pine script code on chart if indicator is same i want to create an EA <Deleted>
I've been staring at this code for a couple hours total, and it's still beyond me. This is a crosshairs indicator that also shows price and server time as I move the cursor across the chart. I want to simply create a server offset so that I can adjust for time zone differences. I cannot figure out
Hi All I was almost in final stage of writing my expert advisor, and somehow my system crashed without backup, and I lost all the code I written, I used some data recovery tool to recover the mq4 and ex4 files of my expert, but when I open that mq4 file in Metaeditor, its corrupted and not showing
Hello gang, Sorry for the very basic post, im trying to figure out why i dont see any rectangles on my chart. Im using Alert, Comment, Print to 'look for bugs' on the code, but its quite hard. Also not much of a C coder, so im opened to any other comments. To simplify the explanation of this
I want to pick up some text from the Object. But Object name has some time stamp, so I just want to pick up if the label contains some letters. For example, Object name is "DE1200" sometimes it is "DE1233" So how can I read text from the object? It contains "DE", so my code is below. for ( int
  EA idea for mt4  (2)
Hello, I am looking for someone to help me create an EA that manages trades that i manually open, There would be a panel on the screen with option to click, buy, or sell. and upon doing so, a trade is taken of a size relative to account balance , a stop loss is added automatically, based on my
I am having a problem with including a mqh file. the mqh file itself has been included and has no error. The errors come when i try to call upon classes from the mqh file. This code is from the mt4 book by Andrew R. Young, At page 148 the end of a simple expert advisor revised for those who have
[Deleted]
  open .ex4 file  (2)
Hello all. I need help writing a script. the basics of the script is as follows var config = { bet: { label: 'bet', value: currency.minAmount * 1.2, type: 'number' }, payout: { label: 'payout', value: 2, type: 'number' } } function main () { game.onBet = function () {
Hei MQL5 Community, I've been working on two entry conditions for my EA. I am still new to coding and would appreciate your assistance in providing your expertise where my code lacks the necessary conditions. The Strategy: 1. The MA filter check is a Boolean that can be either true or false. 2. As
I am looking for a way in MT4 to programatically know how an order was closed, e.g. did the EA close it or was it a human/manually instigated operation. Is this available? I've looked at all the Order* commands, nothing seem to fit this requirement
I've been backtesting and the report says "Modelling quality: N/A." Does it mean that my data is unreliable? Mismatched chart errors: 0 Thanks
Is there a way to know that we are in the current candle or bar? Well I always do is if Open price is the same , we are in the current candle. But is there another way? Thanks
Hi All, I am trying working on an MA cross EA where the stoploss is right above the high of cluster of candles greater than the MA if i'm in a sell and right below the the low of the cluster of candles less than the MA if im in a buy but i'm having a problem figuring out the code. Here is what I
can we read from a file during backtesting in mql4
int hiddenDivergence( int BarsShift) //BarsShift is the shift in bars { double currLowRSI = iRSI ( NULL , 0 , 14 , 0 , iLowest ( NULL , 0 , 3 , 10 , 0 )); //Current RSI (Lowest in the last 10 bars) double currHighRSI = iRSI ( NULL , 0 , 14 , 0
I´m coding an EA that just sells and I code the patron i want the expert follows but i dont know how to set the stop loss where i want (VIEW IMAGE) Here is my code, please help me. //+------------------------------------------------------------------+ //|
Hi, attache dis th image showing stats to my trading, but shrap ratio is not showing. Its available for mt5 alright but with mt4? anyone any clues
Hi, I'm new to mql4. I'm learning. I would like to know if someone could help me with an indicator that I have! I would like to place a horizontal line at the 0 fibonacci level and when moving the horizontal line the fibonacci expands or recedes, thank you very much who can help me #property
So i downloaded as much data as i could on NAS100 and it shows in my history center. I also used only what was available. BUTTTT.... the modeling quality for my EA was still 50.77%. I don't understand what I am doing wrong here. I have searched for answers and i can't find any. Maybe someone could
Hi, I'd like to write a code in MQL4 to count the candles back with a certain condition. E.g. counting the candles back to the point where Moving Avg. 8 crosses Moving Avg. 20 I am not programmer, can anyone help me on this please
Hello all, I have a slight concern I am running into. There is this EA I am testing on the strategy tester . The issue: I set the strategy tester to run from 17/05/2021 until 16/05/2022 , the EA seems to work just fine but only until near the end the EA does not follow the logic. What I have done
Hi, I am US residents and searching the good database of MT4 experts which has 1:50 leverage. Can you please guide me to find based on subject line? Thanks, Raj
Hi all. I have been suffering from some VPS trouble using the built in VPS on MT4. Initially I was seeing ' 1 chart, 0 EA, 1 custom indicator, signal disabled but I seem to now be facing a different problem after the EA now appears to have migrated. After what seems to be a sucessful migration, is
I have a new Windows 11 (fully updated) Dell computer which is pretty fast (12th Gen Intel i9-12900K, 32G RAM, 2 SSD's). I like it, and with 16 cores/24 threads, I can run a lot more MT4's at once now, but there is one big drawback, which is that when I use the MT4 Order form to update the S/L or
Hi, When you click New Order in MT4, by default you have the order type for Market Execution. Is there any configuration to change the default type to Pending Order? Your help is greatly appreciated. Thank you Kelvin