MQL4 and MetaTrader 4 - page 289

//+------------------------------------------------------------------+//|CLASS instrument                                                  |//+------------------------------------------------------------------+class instrument  {public:   string            symbol;...
I need some help to formulate a code which will close the order exactly at the bar's end.It is for a special scalper EA, so it needs pinpoint precision.Let me illustrate what i mean: Here you can see for example an M15 EUR/USD chart.Now imagine if i had any indicator that took me into a long trade...
Hi friends, I coded to close my order partially - for example close only 2 lots of a 10 lots order- and then I found out that after the partial closing (closing some of the order lots) the order number has been changed into a new number. I also tested it manually in other brokers and there was the...
Hi all, I'm wondering if anyone can help. I'm looking for a way to code in MQL4 that allows me to calculate the movement in price, as a percentage, from a recent high or low to the current price. I am aware if the iHigh and iHighest functions in MQL4, but the problem with these is time frames. For...
I usually do manual backtesting and use F12 key to forward the candlestick one be one. (F12 key in backtesting is mentioned at  https://www.fxdayjob.com/manual-backtesting-in-mt4) I want to speed up this, e.g., by pressing S key, 5 or 10 candlesticks are forwarded. I wrote the following code, but...
  Beginner Problems!  (15   1 2)
Firstly let me start by saying I have no coding background (bar a small bit of HTML and CSS, not much use here). I have been trying unsuccessfully to code an EA for this strategy, using online guides and taking "inspiration" from other EA's. Needless to say, it hasn't worked very well. Before I go...
Hi I'm trying to make an EA which check some conditions in all time frames . whenever conditions output was true in one of time frames it must send the position . my questions : 1- is it correct way to make it multi time ? 2 - i don't know how to say if you sent a position don't repeat sending
On testing an EA - Report - Mismatched Chart Errors.  On one computer I get 115 errors on another I get 813 with exactly the same Expert Properties.  This of course changes the profits significantly.  Would you explain to me how this occurs and suggest how I might reduce this number.
Hi, Anybody here who knows how to become official data provider for MT4? If yes please help me.  Thanks, Santosh More
  EA doesn't work  (5)
Can anyone please make this EA works again? Thank you
  Coding  (1)
Please code this for me in Metatrader4: R1,R2,R3 & PP, S1,S2,S3. permanent on cht. Arrow outputs prefared?  // -- CALCULATION FOR PIVOTS ---        PP[i] = (Highpoint[i]+Lowpoint[i]+Closepoint[i])/3;     R1[i] = (2*PP[i]) - Lowpoint[i];     S1[i] = (2*PP[i]) - Highpoint[i];     R2[i] = PP[i] +...
Good morning all. I use the this code to take screenshot yet when I open the file there are no picture. Can somebody identify my dumb dumb. Many thanks in advance. //+------------------------------------------------------------------+//|...
[Deleted]
Hi guys, i like to receive an Alert message with Alert(); with the Text of the current timeframe in the chart Alert(Show me the actual chart timeframe); I can't find a call for that. I think one of you know an easy solution.
Hello People, I am looking for some indicator that would allow me to zoom out more than it does by default. I would like to see 7200 minute candles (5 days of the week) crunched into in the displayed screen. Is there any indicator that would allow me to do it? Thank you
[Deleted]
Hello, i have a function created with wininet which does read the website content into a string and i am wondering, when i change the website content then the function does not show me the new content, but when i close metatarder and start new, then he show me now the new website content, but why...
Hi guys, So i wanted to use iBarShift to find out in a higher timeframe, which bar covers a specific time. But it does return -1 sometimes (i put false as the exact parameter ). My suspicion is that it does that because the bars are not yet initialized in the higher timeframe. Only when i enter that
Hi I want to create 4 random numbers at every tick. These could be either 1,2,3,4,5. So at every tick  formula creates 1 random number e.g 1 etc. How do you do this in MQL4? Thanks.
I have a scirpt that will close all trades.. At the end it prints that the trade was closed successfully... Can i add this line of code (TpAmount+=OrderTicket(OrderProfit);) and get the profit/loss of the trade just closed and have it add to my previous TpAmount variable? here is the code...  {...
Hi all I would like to know how to create these little line markers just above the time line y axis. They are not able to be selected or moved around. I cannot find a OBJ_TYPE corresponding to it in ObjectCreate(). 
I'm having an issue where I've written an indicator and am now using it to backtest a strategy.  I start my backtester in visual mode and then drop my indicator onto the chart.  When I do that, the lines in the indicator don't ever update from that point forward, they just stay at the same value,...
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...
Hello, I recently bought an EA that Hedge's and that can open lots of buy and sell orders at the same time. For example on EURUSD there can be 50 orders opened between buy and sell.  Obviously I don't have the source code but is it possible to have a EA created that could limit the amount of buy and...
Hey guys, I wonder if it's possible to hide the symbol and TF with code/script? Or is ther any trick to hide it without script? Thanks guys, have a great day!
  Information mql4  (1)
good morning, Could someone explain to me if is possible close half position using the app for Apple and if is possible put trailing stop. I would like to know how to log off from the Apple app.thank you very much for your attention.
i want return(lot_buy)  in OrderSend(Symbol(),OP_SELL,********,Bid,2,ssl,stp,NULL,Magicnumber,0,clrRed); plz help me void OpenSellOrder()    {          if(TakeProfit>0&&StopLoss>0)          {             stp=Bid-(TakeProfit*Point);             ssl=Bid+(StopLoss*Point);          }          else...
Hi dear coders, I would like to normalize the indicator Chaikin-Volatility.mq4.  For this reason, I downloaded the Normalizer.mq4 indicator from this site and I made all the required replacements (I believe) but there is no drawing.  Could you tell me if there is a mistake done by me or the...
how can I print a value on a graph? with this function I can do it but keep changing what I want is. example: if profit> 10 print 20 20 must not change until the next condition  profit> 20 printing 30 if profit returns to 10 remain in print 30 double profitstopsell;   if (OrdersTotalMagicsell...
  Stop loss always  (1)
Hi is there any possibility to set always stop loss on mt4. For example every time you enter a trade the stop loss will be set 50 pip automatically etc.
I have MT4 running on Max OSX.  I know how where to place and refresh the indicators and EAs, but when mql5.com's demo link prompts me to click if I have MT4, then nothing happens when clicked. Does anyone knows how to make this work? Thanks :-)
Hi,  I have started to look at MQL5, which is quite hard even if I have some informations about MQL4. What I would like to do is to have in the data window (as an indicator), for each 15M candle, buffers of the 1M candles data that composed the 15M candle. At the same time have the direction of the...