MQL4 and MetaTrader 4 - page 94

Hello everyone, I hope someone can help to check my code. I wrote my own function that counts the number of orders aggregated separately by the magic number. However, when I ran the Strategy Tester , I found that the function might not work as well. Here is what I wanted to do in the code. (I will
Hello everyone. Sorry for my English. This code gives me compile error. 'Class2' - declaration without type Class1.mqh class Class1 { private : Class2 class2; public : Class1(){}; ~Class1(){}; }; class Class2 { private : Class1
  MT4 Beginner  (5)
Hi everyone, when I Analyse the market and then I colse the window, the Analysis is gone. how can I Change it? thanks martin
Hello, I hope that I am posting this in the right section. I've done so research of my own to see if I could find the solution online, but this doesn't seem to be such a big topic. I've found post of other who had the same issues, but no one offered any solutions. I figured I give it a shot myself
[Deleted]
The EA works on the live & demo markets but when testing it works on some markets but not other, what might be the issue
Hi, Im having some problems with showing certain objects only in specific TF. What happens is that it doesnt show  em at all.string tf = "";int timeframe = 0;string comment="";     switch(Period()){      case 1: comment="BB_M1"; tf="M1";timeframe=0x0001;      case 5:...
Hello. Does the indicator initialize every time you call iCustom
Hi guys indicator not work and Error array out of range. can you fix it ? #property copyright "Copyright 2022, Moal sofware Crop." #property link "https://t.me/moalpert" #property version "1.00" #property strict #property indicator_chart_window #property indicator_buffers 1 #property
Hello, I have these functions: void PositionSave() { int handle = FileOpen ( __FILE__ + ".bin" , FILE_WRITE | FILE_BIN ); if (handle== INVALID_HANDLE ) { Print ( "Handle Invalid" ); return ; } else { FileWriteInteger (handle,MyDialog.Top());
Can anyone point me to the tools/libraries that can be used for developing Pattern Recognition on MT4? Thank you
Hi, I draw short horizontal lines using this code Line=Time[a]+( PeriodSeconds ()*HlineBars); It draws shorter lines if there's weekend, I want to fix it, how do I fix it? Thanks in advance
Hello community, i'd like to ask if someone else encountered this weird error that can only appear during backtest (and not on demo or live): OrderSend error 4107. The error should be related to: Negative values in price , stoploss or takeprofit parameters of the OrderSend() or OrderModify()
[Deleted]
I keep getting this error code with my Expert's. What does it mean? I tried several brokers and it happens in all of them.    The curious thing is that after a few dozens of trials/iterations, the orders are finally matched. From this I can say there is nothing wrong with the code. Besides, I tried...
Hello everyone, Is there an effective method for retrieving the balance and closed trades from more than a hundred MT4 accounts? I have created a prototype with an MT4 script that connects to the accounts one by one to retrieve this information. It works, but it is not an efficient method in the
It is on MT4 and it is an exhaustion levels indicator. Couldn't find any more info on it, nor do I have the Documentation. Edit: I think I posted this in the wrong section
Hi, when I reopen my terminal, sometimes I am getting unwanted trades based on settings from when I was using the EA in a prior terminal session. How can I prevent EA from trading when I first open the terminal until I actually manually reattach it to the chart?  Thanks in advance! 
I am working on compiling codes and have come to a bit of a loss when it comes to these 4 lines. am I just writing it an older way? do i need to define with an enum? double LOWWeekly = iMA(Symbol(),PERIOD_W1,1,0,MODE_LOW,PRICE_LOW,0); // line for lower code
how can i be declare in mql4 if ( PositionSelect ( _Symbol ) == false ) { //Buy code if( EMA_handle[0] > SMMA_handle[0]) { trade.Buy(0.1,_Symbol); } //Sell Code if( EMA_handle[0] < SMMA_handle[0]) { trade.Sell(0.1,_Symbol); } } if(PositionSelect(_Symbol) == true) {
Hey guys anyone has the SMT Divergence indicator or developing it
  error 112  (5)
i hit wall with this errror my code compile with no other errors ,the error is internal error #112 0 0, the only piece of info about it is in mql4 page which it said Double quote (") omitted any help will be appreciated ,thx
Hi, I am happy if you can tell me about exponent. Value = 2^3 = 2x2x2=8 Below is the code double Value = MathPow ( 2.0 , 3.0 ); But I want to know below. How can I know x=3 with mql4 code
simple range breakout but it is not submitting any buy or sell. void OnTick() { string EndOfOpeningPeriod = "09:30:"; string CurrentTime = TimeToStr(TimeLocal(), TIME_SECONDS); int EndOfOpeningPeriodFound = StringFind(CurrentTime, EndOfOpeningPeriod, 0); int HighestCandle = iHighest(_Symbol
  Universal MA Cross EA  (1269   1 2 3 4 5 ... 126 127)
I try to make an EA for any Moving Average Cross strategy, try to make it universal. So please let me know should you have any suggestion to add to this EA. Common Setting : ----------------- StopLoss (default 100) Set your Stop Loss. Use 0 (zero) if you don't like to use Stop Loss ( not recommended
https://www.mql5.com/en/forum/12423/page637#comment_11263460 Hi, there is a good comment by Golubev in the above linke about slippage. So just to double check as I understand 1) MT4 does not provide Stop Limit Orders. 2) Stop orders will trigger at market, then it may be necessary to add a slippage
Hi everyone I'm trying to write an EA based on MACD indicator . Below is my framework. It works almost okay, but has a very strange bug I couldn't handle. I did much effort to search some posts but found nothing helpful. #define MAX_NUM_HISTORY_MACD_DATA 40 ENUM_TIMEFRAMES MyTimeFrame = PERIOD_M5 ;
Hi, I started like signal provider. I have 4 months in the history of my account, but I did connect with mql5 right now. I only see the history for the last month and the previous statistics are not visible. How I can fix it? I want all my history see here. Thank you for tips
Hi, I read a datetime string from a CSV formatted file with the proper extention. Let's say the datetime is 2023.03.23 20:15:00. When I read the datetime with FileReadDatetime, the value returned is 2023.03.23 00:00:00 instead. The minutes and seconds are ignored. The problem doesn't occur if the
//--- Include standard libraries #include <Trade\AccountInfo.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\Trade.mqh> #include <Indicators/Trend.mqh> //Declared Valuation double Ask_price; double Bid_price; CTrade trade; CPositionInfo positionInfo; int
Hi everyone, First of all let me tell you that I am pretty new to coding and I read a lot of stuff and spent a lot of time before asking this question... This forum really helps a lot, thanks to all contributors. I have written an EA that is more like a scalper. I say "like" because it's not exactly...
[Deleted]
Hi everyone, I need help to build up my strategy. I used that Idea with manual trading andit`s profitable. So now I need to have it automatic. I would really thankful if anyonecan code given below strategy. Basic Trading Strategy : # Check previous candle high value. Place pending buy order...