MQL4 and MetaTrader 4 - page 62

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...
Lets assume i want to get full protection. As i heard someone decompiled the locker of account. I may want to prevent client mistake aswell . If client sends the mq4 File instead of ex4. The question is If i create an MQH File and include that in to ex4. Compile. So even if they mistakely send mq4
hi MetaTrader hangs in the time frame below 15 minutes please fix this indicatore and set alerts sound for arrows. thanks
It is called Bar Direction. My idea is that if the current bar has C higher than Midpoint, it will be equal to 1 and vice versa. But if that bar is a perfect Doji (C = O and C = Midpoint), it will be equal to Direction of the Previous Bar. That's when the problem arose and I don't know how to solve
Hello everyone , if I share my ex4 file with an account number protection and using the MQL5 Cloud Protector in Metaeditor to provide additional protection , do you think someone can still break the account number protection even if I use the MQL5 Cloud Protector? I understand that you don't
  Grid system help  (6)
Hello coders I need help in correcting the code below. I want a situation whereby after the buy order has been activated the grid will open buy orders after every increase of 50 pips and when s ell order has been activated the grid will open trades after a decrease of 50 pips. I've tried
Hi. first thanks for all, and excuse for my English, I do better than I can :D I develop my own EA and I want to put some bmp images to chart. I don't have any problem to create an bmpObject and load bmp file from MQL4/Files folder, but this only work on realtime mode, if I try on test mode , the
Hi, When hovering over an object you usually see a default tooltip. With vertical lines, for example, it is 3 rows: 1, the object's name, 2, the object's description, 3, the price at which your mouse pointer is intersecting that line. You can change this with something like: ObjectSetString(0...
  ATR % projection  (1)
Hello, I'm looking for an ATR projection indicator that can plot a series of small horizontal lines (bands) for that days period / price action which is a projection of the days trading range at say 50%, 75% and 100% of the range Does such an indicator exist in the publoc domain ? I have a screen...
Hi, I'm struggling in converting this old indicator to a newer version that uses OnCalculate() instead of onstart(). In the version with OnCalculate() the indicator stops giving any type of indication. I have read the documentation but there's something I'm missing about how to use the
Hi All, i had an error in my simple engulfing EA which i tried almost a week still cant found the error. This EA is when the IF condition is hit then execute the BUY OrderSend() without set the stop loss price because i want to avoid the candlestick shadow hit on my stoploss price while still