MQL4 and MetaTrader 4 - page 113

Maybe my problem is unusual, but it's certainly complicated, and I admit I painted myself into a corner. I have an include file called AllMyFunctions.mqh. All my EAs begin by 'including' that file. Some EAs maye have ad hoc functions, but most functions and variables come from AllMyFunctions.mqh
Just wondering if this is the right place to put this or not. I'm wondering if there's a script/way to auto put a stop loss as soon as I open an order without manually putting it in (sometimes I just want to get in) but say I want a 20 pip stop loss as that's my 2% / trade max (just an example) is
[Deleted]
I am testing my EA on H1 frame, I get following errors: 2009.02.17 17:58:03 TestGenerator: unmatched data error (volume limit 1445 at 2008.12.16 09:00 exceeded) I also see Mismatched chart errors in the Strategy Tester Report. I understand the errors because I 've read other discussions on the site,...
void TrailingBuy(){ for (cnt= OrdersTotal ()- 1 ;cnt>= 0 ;cnt--){ if ( OrderSelect (cnt,SELECT_BY_POS,MODE_TRADES)) if (OrderSymbol()== Symbol ()) if (OrderMagicNumber()==Magic) if (OrderType()==OP_BUY) if (Bid-OrderOpenPrice()>TrailingStop* Point ) if
Hello. Friends, please tell me if I understand correctly this trade log and the situation that happened . Orders that from 00:57:42 to 00:58:42 were closed for a whole minute in the amount of 100 pieces. Do I understand correctly that the broker spent an average of 0.6 seconds on each trade to
Dear Programmers, I would like to send an e-mail with HTML codes. Normally, I ought to use two lines in the Header of the e-mail: MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-2 But, how can we edit the Header of the e-mail? Or is there any way we can use HTML codes...
Hi everyone, I want to find the latest swing high and swing low. I used this code to find it: double swingHigh = iHigh ( Symbol (), PERIOD_CURRENT , iHighest ( Symbol (), PERIOD_CURRENT , MODE_HIGH , WHOLE_ARRAY , 5 )); double swingLow = iLow ( Symbol (), PERIOD_CURRENT , iLowest ( Symbol ()
I ran an EA and had an interesting result. Not very good, but interesting curves. I have to study it more. Then I ran a second EA, two timeframes. It was worse. Then I ran third EA, two timeframes. Also worse. So I thought about something I should have paid attention to in first EA and ran it again
Hi guys, the command OtherBarZeroTime = iTime ( ChartSymbol (ID), ENUM_TIMEFRAMES (timeframe), 0 ); does not update at all when I loop around charts (30 charts). The time of the Zero bar is too early for non current bars. Sometimes it gives me the time of bar one of the chart. Any solution please
I don’t usually have access to MT4 on my desktop. Would that be possible to open a new trade on MT4 via C# or JavaScript over the web? My broker, ICMarkets, doesn’t provide an API. Thanks
Hello, Are there any problems with MT4 on Windows 11? I bought an indicator that I can't install on the MT4 software because the "market" tab doesn't appear at all. I don't have this problem on another PC with windows 10. Do you have any solutions? Thanks
Hey guys, can anyone please help me just edit this simple MQ4 indicator to send notifications to my phone when the size of the candle exceeds the set value. I will really appreciate it in advance
I want to put a cap on losses before I turn off the EA to avoid further damage on a clear bad day. Do you think this is the correct way to do it? starting up: double TodaysEquity = AccountEquity(); double InitialEquity = AccountEquity(); double TodaysLoss; double WorstLoss; int Today; int
I am not sure whats going on but does mt4 strategy tester cache previous backtests ? because I am seeing something strange in backtesting , I set parameters and run backtest on last 12 years , and it shows net return of let say 200$ , So I slightly change the input settings but it still shows 200$
Hi there, I'm running into problems creating an EA that runs through history, fetches a bunch of trade data and then exports that to Excel. The EA works fine except that I seem to be getting inaccurate data when I go back to around Nov 2021 in history on the M1 chart. I have setup MT4 to show max
Hello, please, I need complete this code. Any suggestion? thanks //+------------------------------------------------------------------+ //| fFractalSegmentSeriesAnalysis.mqh | //| Copyright 2019, Korotchenko Roman | //| https://www.mql5.com |
Hello, Possible to change the font size in MT4? The font in the chart are too smal. I use MT4 with WIn10 in a laptop with screen 15". Still not easy to read it. Thank you for your help
  FileOpen  (3)
/ void OnStart () { //--- incorrect file opening method string terminal_data_path= TerminalInfoString ( TERMINAL_DATA_PATH ); string filename=terminal_data_path+ "\\MQL4\\Files\\" + "fractals.csv" ; int filehandle= FileOpen (filename, FILE_WRITE | FILE_CSV ); if (filehandle< 0 ) {
[Deleted]
Hi all, I have a custom indicator and I build an EA from it. I would like to know is there any chance to put the indicator into the EA so I would be able to sell it via the market? Iam not talking about the iCustum function, I already use this to use it with my terminal, but nobody would be able to...
Hi all, Need your help, I have create a EA, but stuck on "Put limit / One Trade Only per Condition".... My target is, if a Condition meet EA will make order until take profit or stop loss, then wait until next condition meet. Hopefully you all can help me to resolve my stuck on this script.... Thank
EA Autoscale Compounding Lots. Hi , I want to share My Codes to everybody. This is very powerfull algotrade to compound your account. You can modify and match with your trading style. Compounding lots is complicated. I made structure using percentage balance account. If you having good result with
Question regarding MT4. Do Close All position EA's/Scripts send a single order for the total size of the open positions? Or do they ust replicate the manual process of closing orders 1 by 1? or are both possible, but depends on the code? ie if I have 10 seperate 0.1 lot orders open in EURUSD and use
Hi all, I have a simple question! I just want to know whether it is possible to use chart index as chart ID in an expert advisor when I call the function ChartSetInteger to change chart's properties such as color? I have tried to use index assuming 0 is the current chart which is not closed yet and
Hi, Can we view magic number in Trade list tab in Terminal Window (marked in attached image) window in MT4.. Or where we can check trades magic number
  Macd in Main Chart  (14   1 2)
Has anyone developed a Macd line that would go in the main chart... ? Thanks
Hi my EA open 1 order and several order stop. I tried to delete the order stop if the open order is closed or get stopped out. void DeletePendOrder() { for ( int i= OrdersTotal ()- 1 ; i >= 0 ; i--) { if ( OrderSelect (i,SELECT_BY_POS,MODE_TRADES) && OrderSymbol() == Symbol ()
hi guys, im having problems to build a volume profile in my mt4 experts, iVolume and Volume[] just returns the candle volume, can someone explain me how to do this? thanks
I already have it, but I need it in a new machine. I went to this page and downloaded the file that is clearly identified as MetaTrader 4 for Desktop, Windows. I received a file named mt4setup.exe. I already had mt5setup.exe stored in the first machine, the same one I used to do the download, and
I'm not sure how to ask this question. Is there such a thing as a mostly common practice to extend the return=true even after the initial trigger is no longer true ? bool up_fib() { { //Print(A_low()," ",B_high()," up_fib"); if (A_low() && B_high()) {
Hi there, I would like to download a dynamic trailing stop to use instead of the one that come pre configured on MT4. Does anyone know where I can download one to use with the platform? Thank you, Chris